Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit d99705e

Browse files
committed
Fix pytest warning in integration tests
Also using -rw as an additional option to pytest will always print warnings for us
1 parent c36af50 commit d99705e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/tests/test_integration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
__all__ = ()
2222

2323

24-
class TestEnv(object):
24+
class FakeTestEnv(object):
2525
"""An isolated environment where pydocstyle can be run.
2626
2727
Since running pydocstyle as a script is affected by local config files,
@@ -109,7 +109,7 @@ def install_package(request):
109109

110110
@pytest.yield_fixture(scope="function", params=('pydocstyle', 'pep257'))
111111
def env(request):
112-
with TestEnv(request.param) as test_env:
112+
with FakeTestEnv(request.param) as test_env:
113113
yield test_env
114114

115115
pytestmark = pytest.mark.usefixtures("install_package")
@@ -854,7 +854,7 @@ def foo():
854854

855855

856856
def test_pep257_entry_point():
857-
with TestEnv('pep257') as env:
857+
with FakeTestEnv('pep257') as env:
858858
_, err, code = env.invoke()
859859
assert code == 0
860860
assert 'Deprecation Warning' in err, err

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ commands=sphinx-build -b html . _build
2323
pep8ignore =
2424
test.py E701 E704
2525
norecursedirs = docs .tox
26+
addopts = -rw
2627

2728
[pep257]
2829
inherit = false

0 commit comments

Comments
 (0)