Test to make sure that pytest ignores valid setup.py files when ran with --doctest-modules
(self, pytester: Pytester)
| 795 | assert reportinfo[1] == 1 |
| 796 | |
| 797 | def test_valid_setup_py(self, pytester: Pytester): |
| 798 | """ |
| 799 | Test to make sure that pytest ignores valid setup.py files when ran |
| 800 | with --doctest-modules |
| 801 | """ |
| 802 | p = pytester.makepyfile( |
| 803 | setup=""" |
| 804 | from setuptools import setup, find_packages |
| 805 | setup(name='sample', |
| 806 | version='0.0', |
| 807 | description='description', |
| 808 | packages=find_packages() |
| 809 | ) |
| 810 | """ |
| 811 | ) |
| 812 | result = pytester.runpytest(p, "--doctest-modules") |
| 813 | result.stdout.fnmatch_lines(["*collected 0 items*"]) |
| 814 | |
| 815 | def test_main_py_does_not_cause_import_errors(self, pytester: Pytester): |
| 816 | p = pytester.copy_example("doctest/main_py") |
nothing calls this directly
no test coverage detected