Lines Matching refs:testdir

18     def test_collect_testtextfile(self, testdir):  argument
19 w = testdir.maketxtfile(whatever="")
20 checkfile = testdir.maketxtfile(
29 for x in (testdir.tmpdir, checkfile):
31 items, reprec = testdir.inline_genitems(x)
36 items, reprec = testdir.inline_genitems(w)
39 def test_collect_module_empty(self, testdir): argument
40 path = testdir.makepyfile(whatever="#")
41 for p in (path, testdir.tmpdir):
42 items, reprec = testdir.inline_genitems(p, "--doctest-modules")
45 def test_collect_module_single_modulelevel_doctest(self, testdir): argument
46 path = testdir.makepyfile(whatever='""">>> pass"""')
47 for p in (path, testdir.tmpdir):
48 items, reprec = testdir.inline_genitems(p, "--doctest-modules")
53 def test_collect_module_two_doctest_one_modulelevel(self, testdir): argument
54 path = testdir.makepyfile(
61 for p in (path, testdir.tmpdir):
62 items, reprec = testdir.inline_genitems(p, "--doctest-modules")
69 def test_collect_module_two_doctest_no_modulelevel(self, testdir): argument
70 path = testdir.makepyfile(
87 for p in (path, testdir.tmpdir):
88 items, reprec = testdir.inline_genitems(p, "--doctest-modules")
95 def test_simple_doctestfile(self, testdir): argument
96 p = testdir.maketxtfile(
103 reprec = testdir.inline_run(p)
106 def test_new_pattern(self, testdir): argument
107 p = testdir.maketxtfile(
114 reprec = testdir.inline_run(p, "--doctest-glob=x*.txt")
117 def test_multiple_patterns(self, testdir): argument
119 testdir.maketxtfile(
125 testdir.makefile(
132 testdir.maketxtfile(
139 assert {x.basename for x in testdir.tmpdir.listdir()} == expected
141 result = testdir.runpytest(*args)
143 result = testdir.runpytest()
150 def test_encoding(self, testdir, test_string, encoding): argument
152 testdir.makeini(
166 testdir._makefile(".txt", [doctest], {}, encoding=encoding)
168 result = testdir.runpytest()
172 def test_doctest_unexpected_exception(self, testdir): argument
173 testdir.maketxtfile(
180 result = testdir.runpytest("--doctest-modules")
200 def test_doctest_outcomes(self, testdir): argument
201 testdir.maketxtfile(
223 result = testdir.runpytest("--doctest-modules")
236 def test_docstring_partial_context_around_error(self, testdir): argument
240 testdir.makepyfile(
262 result = testdir.runpytest("--doctest-modules")
280 def test_docstring_full_context_around_error(self, testdir): argument
284 testdir.makepyfile(
296 result = testdir.runpytest("--doctest-modules")
310 def test_doctest_linedata_missing(self, testdir): argument
311 testdir.tmpdir.join("hello.py").write(
324 result = testdir.runpytest("--doctest-modules")
329 def test_doctest_linedata_on_property(self, testdir): argument
330 testdir.makepyfile(
342 result = testdir.runpytest("--doctest-modules")
359 def test_doctest_no_linedata_on_overriden_property(self, testdir): argument
360 testdir.makepyfile(
373 result = testdir.runpytest("--doctest-modules")
390 def test_doctest_unex_importerror_only_txt(self, testdir): argument
391 testdir.maketxtfile(
397 result = testdir.runpytest()
407 def test_doctest_unex_importerror_with_module(self, testdir): argument
408 testdir.tmpdir.join("hello.py").write(
415 testdir.maketxtfile(
421 result = testdir.runpytest("--doctest-modules")
431 def test_doctestmodule(self, testdir): argument
432 p = testdir.makepyfile(
442 reprec = testdir.inline_run(p, "--doctest-modules")
445 def test_doctestmodule_external_and_issue116(self, testdir): argument
446 p = testdir.mkpydir("hello")
459 result = testdir.runpytest(p, "--doctest-modules")
472 def test_txtfile_failing(self, testdir): argument
473 p = testdir.maketxtfile(
480 result = testdir.runpytest(p, "-s")
493 def test_txtfile_with_fixtures(self, testdir): argument
494 p = testdir.maketxtfile(
501 reprec = testdir.inline_run(p)
504 def test_txtfile_with_usefixtures_in_ini(self, testdir): argument
505 testdir.makeini(
511 testdir.makeconftest(
520 p = testdir.maketxtfile(
527 reprec = testdir.inline_run(p)
530 def test_doctestmodule_with_fixtures(self, testdir): argument
531 p = testdir.makepyfile(
540 reprec = testdir.inline_run(p, "--doctest-modules")
543 def test_doctestmodule_three_tests(self, testdir): argument
544 p = testdir.makepyfile(
567 reprec = testdir.inline_run(p, "--doctest-modules")
570 def test_doctestmodule_two_tests_one_fail(self, testdir): argument
571 p = testdir.makepyfile(
588 reprec = testdir.inline_run(p, "--doctest-modules")
591 def test_ignored_whitespace(self, testdir): argument
592 testdir.makeini(
598 p = testdir.makepyfile(
609 reprec = testdir.inline_run(p, "--doctest-modules")
612 def test_non_ignored_whitespace(self, testdir): argument
613 testdir.makeini(
619 p = testdir.makepyfile(
630 reprec = testdir.inline_run(p, "--doctest-modules")
633 def test_ignored_whitespace_glob(self, testdir): argument
634 testdir.makeini(
640 p = testdir.maketxtfile(
647 reprec = testdir.inline_run(p, "--doctest-glob=x*.txt")
650 def test_non_ignored_whitespace_glob(self, testdir): argument
651 testdir.makeini(
657 p = testdir.maketxtfile(
664 reprec = testdir.inline_run(p, "--doctest-glob=x*.txt")
667 def test_contains_unicode(self, testdir): argument
669 testdir.makepyfile(
678 result = testdir.runpytest("--doctest-modules")
681 def test_ignore_import_errors_on_doctest(self, testdir): argument
682 p = testdir.makepyfile(
695 reprec = testdir.inline_run(
700 def test_junit_report_for_doctest(self, testdir): argument
702 p = testdir.makepyfile(
712 reprec = testdir.inline_run(p, "--doctest-modules", "--junit-xml=junit.xml")
715 def test_unicode_doctest(self, testdir): argument
720 p = testdir.maketxtfile(
733 result = testdir.runpytest(p)
738 def test_unicode_doctest_module(self, testdir): argument
743 p = testdir.makepyfile(
753 result = testdir.runpytest(p, "--doctest-modules")
756 def test_print_unicode_value(self, testdir): argument
761 p = testdir.maketxtfile(
769 result = testdir.runpytest(p)
772 def test_reportinfo(self, testdir): argument
774 p = testdir.makepyfile(
784 items, reprec = testdir.inline_genitems(p, "--doctest-modules")
788 def test_valid_setup_py(self, testdir): argument
793 p = testdir.makepyfile(
803 result = testdir.runpytest(p, "--doctest-modules")
806 def test_invalid_setup_py(self, testdir): argument
811 p = testdir.makepyfile(
817 result = testdir.runpytest(p, "--doctest-modules")
823 def test_allow_unicode(self, testdir, config_mode): argument
829 testdir.makeini(
839 testdir.maketxtfile(
847 testdir.makepyfile(
858 reprec = testdir.inline_run("--doctest-modules")
862 def test_allow_bytes(self, testdir, config_mode): argument
868 testdir.makeini(
878 testdir.maketxtfile(
886 testdir.makepyfile(
897 reprec = testdir.inline_run("--doctest-modules")
900 def test_unicode_string(self, testdir): argument
905 testdir.maketxtfile(
911 reprec = testdir.inline_run()
914 def test_bytes_literal(self, testdir): argument
918 testdir.maketxtfile(
924 reprec = testdir.inline_run()
958 def test_number_precision(self, testdir, config_mode): argument
961 testdir.makeini(
971 testdir.maketxtfile(
1028 reprec = testdir.inline_run()
1052 def test_number_non_matches(self, testdir, expression, output): argument
1053 testdir.maketxtfile(
1061 reprec = testdir.inline_run()
1064 def test_number_and_allow_unicode(self, testdir): argument
1065 testdir.maketxtfile(
1073 reprec = testdir.inline_run()
1084 def makedoctest(self, testdir, request): argument
1088 testdir.maketxtfile(doctest)
1091 testdir.makepyfile('"""\n%s"""' % doctest)
1095 def test_one_skipped(self, testdir, makedoctest): argument
1104 reprec = testdir.inline_run("--doctest-modules")
1107 def test_one_skipped_failed(self, testdir, makedoctest): argument
1116 reprec = testdir.inline_run("--doctest-modules")
1119 def test_all_skipped(self, testdir, makedoctest): argument
1128 reprec = testdir.inline_run("--doctest-modules")
1131 def test_vacuous_all_skipped(self, testdir, makedoctest): argument
1133 reprec = testdir.inline_run("--doctest-modules")
1136 def test_continue_on_failure(self, testdir): argument
1137 testdir.maketxtfile(
1149 result = testdir.runpytest("--doctest-modules", "--doctest-continue-on-failure")
1162 def test_doctest_module_session_fixture(self, testdir): argument
1166 testdir.makeconftest(
1179 testdir.makepyfile(
1194 result = testdir.runpytest("--doctest-modules")
1199 def test_fixture_scopes(self, testdir, scope, enable_doctest): argument
1203 testdir.makeconftest(
1214 testdir.makepyfile(
1227 result = testdir.runpytest(*params)
1234 self, testdir, scope, autouse, use_fixture_in_doctest argument
1239 testdir.makeconftest(
1251 testdir.maketxtfile(
1258 testdir.maketxtfile(
1264 result = testdir.runpytest("--doctest-modules")
1269 def test_auto_use_request_attributes(self, testdir, scope): argument
1273 testdir.makeconftest(
1290 testdir.maketxtfile(
1296 result = testdir.runpytest("--doctest-modules")
1306 def test_namespace_doctestfile(self, testdir, scope): argument
1311 testdir.makeconftest(
1323 p = testdir.maketxtfile(
1329 reprec = testdir.inline_run(p)
1333 def test_namespace_pyfile(self, testdir, scope): argument
1338 testdir.makeconftest(
1350 p = testdir.makepyfile(
1359 reprec = testdir.inline_run(p, "--doctest-modules")
1364 def _run_doctest_report(self, testdir, format): argument
1365 testdir.makepyfile(
1381 return testdir.runpytest("--doctest-modules", "--doctest-report", format)
1384 def test_doctest_report_udiff(self, testdir, format): argument
1385 result = self._run_doctest_report(testdir, format)
1390 def test_doctest_report_cdiff(self, testdir): argument
1391 result = self._run_doctest_report(testdir, "cdiff")
1406 def test_doctest_report_ndiff(self, testdir): argument
1407 result = self._run_doctest_report(testdir, "ndiff")
1421 def test_doctest_report_none_or_only_first_failure(self, testdir, format): argument
1422 result = self._run_doctest_report(testdir, format)
1438 def test_doctest_report_invalid(self, testdir): argument
1439 result = self._run_doctest_report(testdir, "obviously_invalid_format")
1448 def test_doctest_mock_objects_dont_recurse_missbehaved(mock_module, testdir): argument
1450 testdir.makepyfile(
1462 result = testdir.runpytest("--doctest-modules")