fix issue123 - new "python -m py.test" invocation.
--HG-- branch : trunk
This commit is contained in:
parent
7c6e47f715
commit
eead8f9ab4
|
@ -2,6 +2,7 @@
|
|||
Changes between 1.3.4 and 1.4.0.dev0
|
||||
==================================================
|
||||
|
||||
- fix issue123 - new "python -m py.test" invocation for py.test
|
||||
- fix issue124 - make reporting more resilient against tests opening
|
||||
files on filedescriptor 1 (stdout).
|
||||
- fix issue109 - sibling conftest.py files will not be loaded.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
if __name__ == '__main__':
|
||||
import sys, py
|
||||
sys.exit(py.test.cmdline.main())
|
||||
|
||||
# for more API entry points see the 'tests' definition
|
||||
# in __init__.py
|
|
@ -208,3 +208,11 @@ class TestGeneralUsage:
|
|||
"*1 pass*",
|
||||
])
|
||||
|
||||
|
||||
def test_python_minus_m_invocation(self, testdir):
|
||||
p1 = testdir.makepyfile("def test_hello(): pass")
|
||||
res = testdir.run(py.std.sys.executable, "-m", "py.test", str(p1))
|
||||
assert res.ret == 0
|
||||
p2 = testdir.makepyfile("def test_world(): 0/0")
|
||||
res = testdir.run(py.std.sys.executable, "-m", "py.test", str(p2))
|
||||
assert res.ret == 1
|
||||
|
|
Loading…
Reference in New Issue