Lines Matching refs:testdir

51     def test_funcarg_lookupfails(self, testdir):  argument
52 testdir.makepyfile(
64 result = testdir.runpytest() # "--collect-only")
70 def test_funcarg_basic(self, testdir): argument
71 item = testdir.getitem(
91 def test_funcarg_lookup_modulelevel(self, testdir): argument
92 testdir.makepyfile(
107 reprec = testdir.inline_run()
110 def test_funcarg_lookup_classlevel(self, testdir): argument
111 p = testdir.makepyfile(
124 result = testdir.runpytest(p)
127 def test_conftest_funcargs_only_available_in_subdir(self, testdir): argument
128 sub1 = testdir.mkpydir("sub1")
129 sub2 = testdir.mkpydir("sub2")
153 result = testdir.runpytest("-v")
156 def test_extend_fixture_module_class(self, testdir): argument
157 testfile = testdir.makepyfile(
175 result = testdir.runpytest()
177 result = testdir.runpytest(testfile)
180 def test_extend_fixture_conftest_module(self, testdir): argument
181 testdir.makeconftest(
190 testfile = testdir.makepyfile(
202 result = testdir.runpytest()
204 result = testdir.runpytest(testfile)
207 def test_extend_fixture_conftest_conftest(self, testdir): argument
208 testdir.makeconftest(
217 pkg = testdir.mkpydir("pkg")
238 result = testdir.runpytest()
240 result = testdir.runpytest(testfile)
243 def test_extend_fixture_conftest_plugin(self, testdir): argument
244 testdir.makepyfile(
253 testdir.syspathinsert()
254 testdir.makeconftest(
265 testdir.makepyfile(
271 result = testdir.runpytest("-s")
274 def test_extend_fixture_plugin_plugin(self, testdir): argument
276 testdir.makepyfile(
285 testdir.makepyfile(
294 testdir.syspathinsert()
295 testdir.makepyfile(
303 result = testdir.runpytest()
306 def test_override_parametrized_fixture_conftest_module(self, testdir): argument
308 testdir.makeconftest(
317 testfile = testdir.makepyfile(
329 result = testdir.runpytest()
331 result = testdir.runpytest(testfile)
334 def test_override_parametrized_fixture_conftest_conftest(self, testdir): argument
336 testdir.makeconftest(
345 subdir = testdir.mkpydir("subdir")
366 result = testdir.runpytest()
368 result = testdir.runpytest(testfile)
371 def test_override_non_parametrized_fixture_conftest_module(self, testdir): argument
373 testdir.makeconftest(
382 testfile = testdir.makepyfile(
397 result = testdir.runpytest()
399 result = testdir.runpytest(testfile)
402 def test_override_non_parametrized_fixture_conftest_conftest(self, testdir): argument
404 testdir.makeconftest(
413 subdir = testdir.mkpydir("subdir")
437 result = testdir.runpytest()
439 result = testdir.runpytest(testfile)
443 self, testdir argument
448 testdir.makeconftest(
457 subdir = testdir.mkpydir("subdir")
481 result = testdir.runpytest()
483 result = testdir.runpytest(testfile)
486 def test_autouse_fixture_plugin(self, testdir): argument
489 testdir.makepyfile(
498 testdir.syspathinsert()
499 testdir.makepyfile(
507 result = testdir.runpytest()
510 def test_funcarg_lookup_error(self, testdir): argument
511 testdir.makeconftest(
528 testdir.makepyfile(
534 result = testdir.runpytest()
547 def test_fixture_excinfo_leak(self, testdir): argument
549 testdir.makepyfile(
568 result = testdir.runpytest()
574 def test_request_attributes(self, testdir): argument
575 item = testdir.getitem(
593 def test_request_attributes_method(self, testdir): argument
594 item, = testdir.getitems(
610 def test_request_contains_funcarg_arg2fixturedefs(self, testdir): argument
611 modcol = testdir.getmodulecol(
622 item1, = testdir.genitems([modcol])
628 def test_request_garbage(self, testdir): argument
629 testdir.makepyfile(
663 reprec = testdir.inline_run()
666 def test_getfixturevalue_recursive(self, testdir): argument
667 testdir.makeconftest(
676 testdir.makepyfile(
687 reprec = testdir.inline_run()
691 def test_getfixturevalue(self, testdir, getfixmethod): argument
692 item = testdir.getitem(
734 def test_request_addfinalizer(self, testdir): argument
735 item = testdir.getitem(
755 def test_mark_as_fixture_with_prefix_and_decorator_fails(self, testdir): argument
756 testdir.makeconftest(
765 result = testdir.runpytest_subprocess()
774 def test_request_addfinalizer_failing_setup(self, testdir): argument
775 testdir.makepyfile(
789 reprec = testdir.inline_run("-s")
792 def test_request_addfinalizer_failing_setup_module(self, testdir): argument
793 testdir.makepyfile(
806 reprec = testdir.inline_run("-s")
810 def test_request_addfinalizer_partial_setup_failure(self, testdir): argument
811 p = testdir.makepyfile(
824 result = testdir.runpytest(p)
829 def test_request_subrequest_addfinalizer_exceptions(self, testdir): argument
834 testdir.makepyfile(
858 result = testdir.runpytest()
863 def test_request_getmodulepath(self, testdir): argument
864 modcol = testdir.getmodulecol("def test_somefunc(): pass")
865 item, = testdir.genitems([modcol])
869 def test_request_fixturenames(self, testdir): argument
870 testdir.makepyfile(
889 reprec = testdir.inline_run()
892 def test_funcargnames_compatattr(self, testdir): argument
893 testdir.makepyfile(
908 reprec = testdir.inline_run()
911 def test_setupdecorator_and_xunit(self, testdir): argument
912 testdir.makepyfile(
940 reprec = testdir.inline_run("-v")
943 def test_fixtures_sub_subdir_normalize_sep(self, testdir): argument
945 b = testdir.mkdir("tests").mkdir("unit")
958 result = testdir.runpytest(p, "--fixtures")
967 def test_show_fixtures_color_yes(self, testdir): argument
968 testdir.makepyfile("def test_this(): assert 1")
969 result = testdir.runpytest("--color=yes", "--fixtures")
972 def test_newstyle_with_request(self, testdir): argument
973 testdir.makepyfile(
983 reprec = testdir.inline_run()
986 def test_setupcontext_no_param(self, testdir): argument
987 testdir.makepyfile(
1001 reprec = testdir.inline_run()
1007 def test_applymarker(self, testdir): argument
1008 item1, item2 = testdir.getitems(
1031 def test_accesskeywords(self, testdir): argument
1032 testdir.makepyfile(
1044 reprec = testdir.inline_run()
1047 def test_accessmarker_dynamic(self, testdir): argument
1048 testdir.makeconftest(
1060 testdir.makepyfile(
1071 reprec = testdir.inline_run()
1077 def test_request_cachedsetup_defaultmodule(self, testdir): argument
1078 reprec = testdir.inline_runsource(
1097 def test_request_cachedsetup_class(self, testdir): argument
1098 reprec = testdir.inline_runsource(
1119 def test_request_cachedsetup_extrakey(self, testdir): argument
1120 item1 = testdir.getitem("def test_func(): pass")
1136 def test_request_cachedsetup_cache_deletion(self, testdir): argument
1137 item1 = testdir.getitem("def test_func(): pass")
1158 def test_request_cached_setup_two_args(self, testdir): argument
1159 testdir.makepyfile(
1173 result = testdir.runpytest("-v")
1176 def test_request_cached_setup_getfixturevalue(self, testdir): argument
1177 testdir.makepyfile(
1192 result = testdir.runpytest("-v")
1195 def test_request_cached_setup_functional(self, testdir): argument
1196 testdir.makepyfile(
1216 testdir.makepyfile(
1223 result = testdir.runpytest("-v")
1226 def test_issue117_sessionscopeteardown(self, testdir): argument
1227 testdir.makepyfile(
1242 result = testdir.runpytest()
1249 def test_noargfixturedec(self, testdir): argument
1250 testdir.makepyfile(
1261 reprec = testdir.inline_run()
1264 def test_receives_funcargs(self, testdir): argument
1265 testdir.makepyfile(
1283 reprec = testdir.inline_run()
1286 def test_receives_funcargs_scope_mismatch(self, testdir): argument
1287 testdir.makepyfile(
1302 result = testdir.runpytest()
1312 def test_receives_funcargs_scope_mismatch_issue660(self, testdir): argument
1313 testdir.makepyfile(
1328 result = testdir.runpytest()
1333 def test_invalid_scope(self, testdir): argument
1334 testdir.makepyfile(
1345 result = testdir.runpytest_inprocess()
1353 def test_funcarg_parametrized_and_used_twice(self, testdir): argument
1354 testdir.makepyfile(
1372 result = testdir.runpytest()
1375 def test_factory_uses_unknown_funcarg_as_dependency_error(self, testdir): argument
1376 testdir.makepyfile(
1392 result = testdir.runpytest()
1403 def test_factory_setup_as_classes_fails(self, testdir): argument
1404 testdir.makepyfile(
1414 reprec = testdir.inline_run()
1418 def test_request_can_be_overridden(self, testdir): argument
1419 testdir.makepyfile(
1430 reprec = testdir.inline_run()
1433 def test_usefixtures_marker(self, testdir): argument
1434 testdir.makepyfile(
1455 reprec = testdir.inline_run()
1458 def test_usefixtures_ini(self, testdir): argument
1459 testdir.makeini(
1465 testdir.makeconftest(
1475 testdir.makepyfile(
1484 reprec = testdir.inline_run()
1487 def test_usefixtures_seen_in_showmarkers(self, testdir): argument
1488 result = testdir.runpytest("--markers")
1495 def test_request_instance_issue203(self, testdir): argument
1496 testdir.makepyfile(
1509 reprec = testdir.inline_run()
1512 def test_fixture_parametrized_with_iterator(self, testdir): argument
1513 testdir.makepyfile(
1536 reprec = testdir.inline_run("-v")
1545 def testdir(self, request): member in TestFixtureManagerParseFactories
1546 testdir = request.getfixturevalue("testdir")
1547 testdir.makeconftest(
1564 return testdir
1566 def test_parsefactories_evil_objects_issue214(self, testdir): argument
1567 testdir.makepyfile(
1579 reprec = testdir.inline_run()
1582 def test_parsefactories_conftest(self, testdir): argument
1583 testdir.makepyfile(
1593 reprec = testdir.inline_run("-s")
1596 def test_parsefactories_conftest_and_module_and_class(self, testdir): argument
1597 testdir.makepyfile(
1617 reprec = testdir.inline_run("-s")
1620 def test_parsefactories_relative_node_ids(self, testdir): argument
1623 runner = testdir.mkdir("runner")
1624 package = testdir.mkdir("package")
1663 reprec = testdir.inline_run()
1666 reprec = testdir.inline_run("..")
1673 def testdir(self, testdir): argument
1674 testdir.makeconftest(
1697 return testdir
1699 def test_parsefactories_conftest(self, testdir): argument
1700 testdir.makepyfile(
1710 reprec = testdir.inline_run("-s")
1713 def test_two_classes_separated_autouse(self, testdir): argument
1714 testdir.makepyfile(
1733 reprec = testdir.inline_run()
1736 def test_setup_at_classlevel(self, testdir): argument
1737 testdir.makepyfile(
1750 reprec = testdir.inline_run("-s")
1754 def test_setup_enabled_functionnode(self, testdir): argument
1755 testdir.makepyfile(
1778 reprec = testdir.inline_run("-s")
1781 def test_callables_nocode(self, testdir): argument
1786 testdir.makepyfile(
1797 reprec = testdir.inline_run("-s")
1800 def test_autouse_in_conftests(self, testdir): argument
1801 a = testdir.mkdir("a")
1802 b = testdir.mkdir("a1")
1803 conftest = testdir.makeconftest(
1814 result = testdir.runpytest()
1821 def test_autouse_in_module_and_two_classes(self, testdir): argument
1822 testdir.makepyfile(
1843 reprec = testdir.inline_run()
1849 def test_autouse_conftest_mid_directory(self, testdir): argument
1850 pkgdir = testdir.mkpydir("xyz123")
1872 reprec = testdir.inline_run("-s")
1875 def test_autouse_honored_for_yield(self, testdir): argument
1876 testdir.makepyfile(
1890 reprec = testdir.inline_run()
1893 def test_funcarg_and_setup(self, testdir): argument
1894 testdir.makepyfile(
1917 reprec = testdir.inline_run()
1920 def test_uses_parametrized_resource(self, testdir): argument
1921 testdir.makepyfile(
1943 reprec = testdir.inline_run("-s")
1946 def test_session_parametrized_function(self, testdir): argument
1947 testdir.makepyfile(
1970 reprec = testdir.inline_run("-v", "-s")
1973 def test_class_function_parametrization_finalization(self, testdir): argument
1974 p = testdir.makeconftest(
1996 testdir.makepyfile(
2008 confcut = "--confcutdir={}".format(testdir.tmpdir)
2009 reprec = testdir.inline_run("-v", "-s", confcut)
2015 def test_scope_ordering(self, testdir): argument
2016 testdir.makepyfile(
2035 reprec = testdir.inline_run()
2038 def test_parametrization_setup_teardown_ordering(self, testdir): argument
2039 testdir.makepyfile(
2064 reprec = testdir.inline_run("-s")
2067 def test_ordering_autouse_before_explicit(self, testdir): argument
2068 testdir.makepyfile(
2083 reprec = testdir.inline_run()
2089 def test_ordering_dependencies_torndown_first(self, testdir, param1, param2): argument
2090 testdir.makepyfile(
2110 reprec = testdir.inline_run("-s")
2116 def test_parametrize(self, testdir): argument
2117 testdir.makepyfile(
2130 reprec = testdir.inline_run()
2133 def test_multiple_parametrization_issue_736(self, testdir): argument
2134 testdir.makepyfile(
2148 reprec = testdir.inline_run()
2155 def test_override_parametrized_fixture_issue_979(self, testdir, param_args): argument
2160 testdir.makepyfile(
2174 reprec = testdir.inline_run()
2177 def test_scope_session(self, testdir): argument
2178 testdir.makepyfile(
2198 reprec = testdir.inline_run()
2201 def test_scope_session_exc(self, testdir): argument
2202 testdir.makepyfile(
2219 reprec = testdir.inline_run()
2222 def test_scope_session_exc_two_fix(self, testdir): argument
2223 testdir.makepyfile(
2245 reprec = testdir.inline_run()
2248 def test_scope_exc(self, testdir): argument
2249 testdir.makepyfile(
2274 reprec = testdir.inline_run()
2277 def test_scope_module_uses_session(self, testdir): argument
2278 testdir.makepyfile(
2298 reprec = testdir.inline_run()
2301 def test_scope_module_and_finalizer(self, testdir): argument
2302 testdir.makeconftest(
2320 testdir.makepyfile(
2338 reprec = testdir.inline_run()
2349 def test_scope_mismatch_various(self, testdir, method): argument
2350 testdir.makeconftest(
2360 testdir.makepyfile(
2371 result = testdir.runpytest()
2377 def test_register_only_with_mark(self, testdir): argument
2378 testdir.makeconftest(
2386 testdir.makepyfile(
2396 reprec = testdir.inline_run()
2399 def test_parametrize_and_scope(self, testdir): argument
2400 testdir.makepyfile(
2411 reprec = testdir.inline_run("-v")
2419 def test_scope_mismatch(self, testdir): argument
2420 testdir.makeconftest(
2428 testdir.makepyfile(
2438 result = testdir.runpytest()
2441 def test_parametrize_separated_order(self, testdir): argument
2442 testdir.makepyfile(
2457 reprec = testdir.inline_run("-v")
2462 def test_module_parametrized_ordering(self, testdir): argument
2463 testdir.makeini(
2469 testdir.makeconftest(
2481 testdir.makepyfile(
2499 result = testdir.runpytest("-v")
2521 def test_dynamic_parametrized_ordering(self, testdir): argument
2522 testdir.makeini(
2528 testdir.makeconftest(
2548 testdir.makepyfile(
2556 result = testdir.runpytest("-v")
2570 def test_class_ordering(self, testdir): argument
2571 testdir.makeini(
2577 testdir.makeconftest(
2598 testdir.makepyfile(
2612 result = testdir.runpytest("-vs")
2630 def test_parametrize_separated_order_higher_scope_first(self, testdir): argument
2631 testdir.makepyfile(
2660 reprec = testdir.inline_run("-v")
2706 def test_parametrized_fixture_teardown_order(self, testdir): argument
2707 testdir.makepyfile(
2739 result = testdir.runpytest("-v")
2747 def test_fixture_finalizer(self, testdir): argument
2748 testdir.makeconftest(
2762 b = testdir.mkdir("subdir")
2777 reprec = testdir.runpytest("-s")
2781 def test_class_scope_with_normal_tests(self, testdir): argument
2782 testpath = testdir.makepyfile(
2805 reprec = testdir.inline_run(testpath)
2809 def test_request_is_clean(self, testdir): argument
2810 testdir.makepyfile(
2821 reprec = testdir.inline_run("-s")
2825 def test_parametrize_separated_lifecycle(self, testdir): argument
2826 testdir.makepyfile(
2842 reprec = testdir.inline_run("-vs")
2854 def test_parametrize_function_scoped_finalizers_called(self, testdir): argument
2855 testdir.makepyfile(
2875 reprec = testdir.inline_run("-v")
2880 def test_finalizer_order_on_parametrization(self, scope, testdir): argument
2881 testdir.makepyfile(
2912 reprec = testdir.inline_run("-lvs")
2916 def test_class_scope_parametrization_ordering(self, testdir): argument
2917 testdir.makepyfile(
2938 reprec = testdir.inline_run()
2957 def test_parametrize_setup_function(self, testdir): argument
2958 testdir.makepyfile(
2987 reprec = testdir.inline_run("-v")
2990 def test_fixture_marked_function_not_collected_as_test(self, testdir): argument
2991 testdir.makepyfile(
3002 reprec = testdir.inline_run()
3005 def test_params_and_ids(self, testdir): argument
3006 testdir.makepyfile(
3019 res = testdir.runpytest("-v")
3022 def test_params_and_ids_yieldfixture(self, testdir): argument
3023 testdir.makepyfile(
3036 res = testdir.runpytest("-v")
3040 def test_deterministic_fixture_collection(self, testdir, monkeypatch): argument
3041 testdir.makepyfile(
3066 out1 = testdir.runpytest_subprocess("-v")
3068 out2 = testdir.runpytest_subprocess("-v")
3094 def test_setup(self, testdir, scope, ok, error): argument
3095 testdir.makepyfile(
3112 reprec = testdir.inline_run("-l")
3115 def test_funcarg(self, testdir, scope, ok, error): argument
3116 testdir.makepyfile(
3133 reprec = testdir.inline_run()
3139 def test_subfactory_missing_funcarg(self, testdir): argument
3140 testdir.makepyfile(
3150 result = testdir.runpytest()
3156 def test_issue498_fixture_finalizer_failing(self, testdir): argument
3157 testdir.makepyfile(
3176 result = testdir.runpytest()
3187 def test_setupfunc_missing_funcarg(self, testdir): argument
3188 testdir.makepyfile(
3198 result = testdir.runpytest()
3207 def test_funcarg_compat(self, testdir): argument
3208 config = testdir.parseconfigure("--funcargs")
3211 def test_show_fixtures(self, testdir): argument
3212 result = testdir.runpytest("--fixtures")
3215 def test_show_fixtures_verbose(self, testdir): argument
3216 result = testdir.runpytest("--fixtures", "-v")
3219 def test_show_fixtures_testmodule(self, testdir): argument
3220 p = testdir.makepyfile(
3231 result = testdir.runpytest("--fixtures", p)
3243 def test_show_fixtures_conftest(self, testdir, testmod): argument
3244 testdir.makeconftest(
3253 testdir.makepyfile(
3259 result = testdir.runpytest("--fixtures")
3269 def test_show_fixtures_trimmed_doc(self, testdir): argument
3270 p = testdir.makepyfile(
3291 result = testdir.runpytest("--fixtures", p)
3307 def test_show_fixtures_indented_doc(self, testdir): argument
3308 p = testdir.makepyfile(
3321 result = testdir.runpytest("--fixtures", p)
3333 def test_show_fixtures_indented_doc_first_line_unindented(self, testdir): argument
3334 p = testdir.makepyfile(
3347 result = testdir.runpytest("--fixtures", p)
3360 def test_show_fixtures_indented_in_class(self, testdir): argument
3361 p = testdir.makepyfile(
3375 result = testdir.runpytest("--fixtures", p)
3388 def test_show_fixtures_different_files(self, testdir): argument
3392 testdir.makepyfile(
3405 testdir.makepyfile(
3418 result = testdir.runpytest("--fixtures")
3431 def test_show_fixtures_with_same_name(self, testdir): argument
3432 testdir.makeconftest(
3441 testdir.makepyfile(
3447 testdir.makepyfile(
3458 result = testdir.runpytest("--fixtures")
3484 def test_simple(self, testdir, flavor): argument
3485 testdir.makepyfile(
3502 result = testdir.runpytest("-s")
3514 def test_scoped(self, testdir, flavor): argument
3515 testdir.makepyfile(
3531 result = testdir.runpytest("-s")
3541 def test_setup_exception(self, testdir, flavor): argument
3542 testdir.makepyfile(
3555 result = testdir.runpytest("-s")
3563 def test_teardown_exception(self, testdir, flavor): argument
3564 testdir.makepyfile(
3577 result = testdir.runpytest("-s")
3585 def test_yields_more_than_one(self, testdir, flavor): argument
3586 testdir.makepyfile(
3599 result = testdir.runpytest("-s")
3607 def test_custom_name(self, testdir, flavor): argument
3608 testdir.makepyfile(
3620 result = testdir.runpytest("-s")
3626 def test_call_from_fixture(self, testdir): argument
3627 testfile = testdir.makepyfile(
3643 result = testdir.runpytest()
3658 def test_call_from_test(self, testdir): argument
3659 testfile = testdir.makepyfile(
3671 result = testdir.runpytest()
3686 def test_external_fixture(self, testdir): argument
3687 conffile = testdir.makeconftest(
3697 testfile = testdir.makepyfile(
3703 result = testdir.runpytest()
3718 def test_non_relative_path(self, testdir): argument
3719 tests_dir = testdir.mkdir("tests")
3720 fixdir = testdir.mkdir("fixtures")
3747 testdir.syspathinsert(fixdir)
3748 result = testdir.runpytest()
3764 def test_pytest_fixture_setup_and_post_finalizer_hook(testdir): argument
3765 testdir.makeconftest(
3774 testdir.makepyfile(
3797 result = testdir.runpytest("-s")
3814 def test_func_closure_module_auto(self, testdir, use_mark): argument
3816 testdir.makepyfile(
3835 items, _ = testdir.inline_genitems()
3839 def test_func_closure_with_native_fixtures(self, testdir, monkeypatch): argument
3844 testdir.makepyfile(
3877 items, _ = testdir.inline_genitems()
3881 testdir.runpytest()
3885 def test_func_closure_module(self, testdir): argument
3886 testdir.makepyfile(
3900 items, _ = testdir.inline_genitems()
3904 def test_func_closure_scopes_reordered(self, testdir): argument
3908 testdir.makepyfile(
3933 items, _ = testdir.inline_genitems()
3937 def test_func_closure_same_scope_closer_root_first(self, testdir): argument
3939 testdir.makeconftest(
3947 testdir.makepyfile(
3969 items, _ = testdir.inline_genitems()
3973 def test_func_closure_all_scopes_complex(self, testdir): argument
3975 testdir.makeconftest(
3983 testdir.makepyfile(
4009 items, _ = testdir.inline_genitems()