diff options
author | holger krekel <holger@merlinux.eu> | 2010-11-17 22:12:16 +0100 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2010-11-17 22:12:16 +0100 |
commit | a698465487a9cd92e8223d7f9be0e7710272f8ca (patch) | |
tree | ca2c9641dec4e2343dd4206d4c713bc196fa1dc3 /testing/test_session.py | |
parent | 93a436542c69ea27cd1799266bb49f3f6d4fe7a2 (diff) | |
download | pytest-a698465487a9cd92e8223d7f9be0e7710272f8ca.tar.gz |
streamline docs, especially use "import pytest" and "pytest.*" in python code examples instead of "import py" and "py.test.*".
Diffstat (limited to 'testing/test_session.py')
-rw-r--r-- | testing/test_session.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/testing/test_session.py b/testing/test_session.py index cde45b07d..90c950b7c 100644 --- a/testing/test_session.py +++ b/testing/test_session.py @@ -45,9 +45,9 @@ class SessionTests: def test_raises_output(self, testdir): reprec = testdir.inline_runsource(""" - import py + import pytest def test_raises_doesnt(): - py.test.raises(ValueError, int, "3") + pytest.raises(ValueError, int, "3") """) passed, skipped, failed = reprec.listoutcomes() assert len(failed) == 1 @@ -118,15 +118,15 @@ class SessionTests: def test_skip_file_by_conftest(self, testdir): testdir.makepyfile(conftest=""" - import py + import pytest def pytest_collect_file(): - py.test.skip("intentional") + pytest.skip("intentional") """, test_file=""" def test_one(): pass """) try: reprec = testdir.inline_run(testdir.tmpdir) - except py.test.skip.Exception: + except pytest.skip.Exception: py.test.fail("wrong skipped caught") reports = reprec.getreports("pytest_collectreport") assert len(reports) == 1 @@ -173,8 +173,8 @@ class TestNewSession(SessionTests): pass """, test_two=""" - import py - py.test.skip('xxx') + import pytest + pytest.skip('xxx') """, test_three="xxxdsadsadsadsa", __init__="" @@ -204,10 +204,10 @@ class TestNewSession(SessionTests): def test_plugin_specify(testdir): testdir.chdir() - config = py.test.raises(ImportError, """ + config = pytest.raises(ImportError, """ testdir.parseconfig("-p", "nqweotexistent") """) - #py.test.raises(ImportError, + #pytest.raises(ImportError, # "config.pluginmanager.do_configure(config)" #) |