Created
January 13, 2019 17:52
-
-
Save jaraco/1c38b21873bc9d615a50e831523b680d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
draft $ cat test-pdb.py | |
import sys | |
def test_something(): | |
assert 'pdb' not in sys.modules() | |
draft $ pip-run -q pytest -- -m pytest test-pdb.py | |
================================================================================== test session starts ================================================================================== | |
platform darwin -- Python 3.7.2, pytest-4.1.1, py-1.7.0, pluggy-0.8.1 | |
rootdir: /Users/jaraco/draft, inifile: | |
plugins: xonsh-0.8.8 | |
collected 1 item | |
test-pdb.py F [100%] | |
======================================================================================= FAILURES ======================================================================================== | |
____________________________________________________________________________________ test_something _____________________________________________________________________________________ | |
def test_something(): | |
> assert 'pdb' not in sys.modules | |
E AssertionError: assert 'pdb' not in {'PyObjCTools': <module 'PyObjCTools' (namespace)>, '__future__': <module '__future__' from '/Library/Frameworks/Pytho.../var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-kwj_l0hg/pytest.py'>, '_abc': <module '_abc' (built-in)>, ...} | |
E + where {'PyObjCTools': <module 'PyObjCTools' (namespace)>, '__future__': <module '__future__' from '/Library/Frameworks/Pytho.../var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-kwj_l0hg/pytest.py'>, '_abc': <module '_abc' (built-in)>, ...} = sys.modules | |
test-pdb.py:5: AssertionError | |
=============================================================================== 1 failed in 0.07 seconds ================================================================================ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment