예제 #1
0
    def test_exit_with_proper_error(self, failures, errors, error_code):
        session = Session()
        session.failures = failures
        session.errors = errors
        with raises(SystemExit) as excinfo:
            session.exit()

        assert excinfo.type == SystemExit
        assert excinfo.value.code == error_code
예제 #2
0
 def test_failed_when_there_is_failure(self, failures, errors, expected):
     session = Session()
     session.failures = failures
     session.errors = errors
     assert session.succeed == expected