Skip to content

Commit

Permalink
Enable the doctest_standalone_namespace flag in the tests
Browse files Browse the repository at this point in the history
This flag isn't supported in pytest yet. It will be once
pytest-dev/pytest#6978 is merged. However, I would
recommend waiting until that PR is merged to merge this since the name of the
flag may change.

The flag will make it so that the doctests require all names to be imported in
order to pass, as opposed to the default behavior which automatically includes
all names from the surrounding module in the doctest namespace.
  • Loading branch information
asmeurer committed Apr 23, 2020
1 parent f8706a6 commit b6db4b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[pytest]
addopts = --doctest-modules --doctest-glob=*.md
doctest_standalone_namespace = True

0 comments on commit b6db4b7

Please sign in to comment.