Пример #1
0
def test_hello_world():
    """Simple test that asserts that the hello string is not empty."""
    hello = 'hello, world'
    asserts.is_not_empty(hello)
Пример #2
0
def test_test_run_from_module():
  module = sys.modules[__name__]
  run = test_run.TestRun.from_module(module)
  asserts.is_not_empty(run.tests)
  asserts.are_equal(run.name, 'test_run_test')
Пример #3
0
def test_hello_world():
  """Simple test that asserts that the hello string is not empty."""
  hello = 'hello, world'
  asserts.is_not_empty(hello)
Пример #4
0
def test_test_run_from_module():
    module = sys.modules[__name__]
    run = test_run.TestRun.from_module(module)
    asserts.is_not_empty(run.tests)
    asserts.are_equal(run.name, 'test_run_test')
Пример #5
0
def test_test_suite_from_module():
  module = sys.modules[__name__]
  suite = test_suite.TestSuite.from_module(module)
  asserts.is_not_empty(suite)
  asserts.are_equal(suite.name, 'test_suite_test')
Пример #6
0
def test_assert_not_empty_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_empty(collection)
Пример #7
0
def test_assert_not_empty_ok(collection):
    asserts.is_not_empty(collection)
Пример #8
0
def test_assert_not_empty_bad(collection):
    with asserts.expect_exception(AssertionError):
        asserts.is_not_empty(collection)
Пример #9
0
def test_assert_not_empty_ok(collection):
    asserts.is_not_empty(collection)