Replace a few outdated references to py.test with pytest (#6063)

Replace a few outdated references to py.test with pytest
This commit is contained in:
Bruno Oliveira 2019-10-26 12:59:22 -03:00 committed by GitHub
commit cefe6bfec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
""" """
This is the script that is actually frozen into an executable: simply executes This is the script that is actually frozen into an executable: simply executes
py.test main(). pytest main().
""" """
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -1148,7 +1148,7 @@ def test_dont_collect_non_function_callable(testdir):
"""Test for issue https://github.com/pytest-dev/pytest/issues/331 """Test for issue https://github.com/pytest-dev/pytest/issues/331
In this case an INTERNALERROR occurred trying to report the failure of In this case an INTERNALERROR occurred trying to report the failure of
a test like this one because py test failed to get the source lines. a test like this one because pytest failed to get the source lines.
""" """
testdir.makepyfile( testdir.makepyfile(
""" """

View File

@ -133,17 +133,17 @@ class TestReportSerialization:
""" """
reprec = testdir.inline_runsource( reprec = testdir.inline_runsource(
""" """
import py import pytest
def test_pass(): pass def test_pass(): pass
def test_fail(): 0/0 def test_fail(): 0/0
@py.test.mark.skipif("True") @pytest.mark.skipif("True")
def test_skip(): pass def test_skip(): pass
def test_skip_imperative(): def test_skip_imperative():
py.test.skip("hello") pytest.skip("hello")
@py.test.mark.xfail("True") @pytest.mark.xfail("True")
def test_xfail(): 0/0 def test_xfail(): 0/0
def test_xfail_imperative(): def test_xfail_imperative():
py.test.xfail("hello") pytest.xfail("hello")
""" """
) )
reports = reprec.getreports("pytest_runtest_logreport") reports = reprec.getreports("pytest_runtest_logreport")