~ubuntu-branches/ubuntu/wily/pytest/wily

« back to all changes in this revision

Viewing changes to testing/test_session.py

  • Committer: Package Import Robot
  • Author(s): Barry Warsaw
  • Date: 2014-04-28 18:10:47 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140428181047-oei772n8qdvn1nd2
Tags: 2.5.2-1
* Team upload.
* New upstream release.
* d/patches/remove_google_js: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import pytest, py
 
1
import pytest
2
2
 
3
3
class SessionTests:
4
4
    def test_basic_testitem_events(self, testdir):
54
54
        out = failed[0].longrepr.reprcrash.message
55
55
        if not out.find("DID NOT RAISE") != -1:
56
56
            print(out)
57
 
            py.test.fail("incorrect raises() output")
 
57
            pytest.fail("incorrect raises() output")
58
58
 
59
59
    def test_generator_yields_None(self, testdir):
60
60
        reprec = testdir.inline_runsource("""
127
127
        try:
128
128
            reprec = testdir.inline_run(testdir.tmpdir)
129
129
        except pytest.skip.Exception:
130
 
            py.test.fail("wrong skipped caught")
 
130
            pytest.fail("wrong skipped caught")
131
131
        reports = reprec.getreports("pytest_collectreport")
132
132
        assert len(reports) == 1
133
133
        assert reports[0].skipped