コード例 #1
0
def CreateTestRun2():
  """Test run that will execute the defined test."""
  test_run = checkers.TestRun('calculator2')
  test_run.components.Register('calculator', Calculator())
  test_suite = checkers.TestSuite.FromProto(divide_tests.ParseTestSuiteProto())
  test_run.LoadTestSuite(test_suite)
  return test_run
コード例 #2
0
def CreateTestRun():
    """Test run that will execute the defined test."""
    test_run = checkers.TestRun()
    for number, value in TEST_DATA.iteritems():
        test_case = BuildTestCase(number, value)
        test_run.LoadTestCase(test_case)
        return test_run
コード例 #3
0
def CreateTestRun():
    """Test run that will execute the defined test."""
    test_run = checkers.TestRun()
    test_run.RegisterComponent('calculator', Calculator())
    test_run.LoadTestCase(TestOnePlusOneEqualsTwo)
    test_run.RegisterSetUpFunction(SetUp1)
    test_run.RegisterSetUpFunction(SetUp2)
    test_run.RegisterTearDownFunction(TearDown1)
    test_run.RegisterTearDownFunction(TearDown2)
    return test_run
コード例 #4
0
def CreateTestRun():
  """Test run that will execute the defined test."""
  test_run = checkers.TestRun()
  # For per-test setup/teardown (once per test case).
  test_run.RegisterTestCaseSetUpFunction(TestCaseSetUp)
  test_run.RegisterTestCaseTearDownFunction(TestCaseTearDown)
  # For per-test run setup/teardown (once per test run).
  test_run.RegisterSetUpFunction(TestRunSetUp)
  test_run.RegisterTearDownFunction(TestRunTearDown)
  # Actual test cases.
  test_run.LoadTestCase(TestOnePlusOneEqualsTwo)
  test_run.LoadTestCase(TestZeroPlusOneEqualsOne)
  return test_run
コード例 #5
0
def CreateTestRun():
    """Test run that will execute the defined test."""
    test_run = checkers.TestRun()
    test_run.LoadTestSuite(CreateAdditionTestsSuite())
    test_run.LoadTestSuite(CreateSubtractionTestsSuite())
    return test_run
コード例 #6
0
def CreateTestRun():
    """Test run that will execute the defined test."""
    test_run = checkers.TestRun()
    test_run.LoadTestsFromModule(multiply_tests)
    return test_run
コード例 #7
0
def CreateTestRun():
  """Test run that will execute the defined test."""
  test_run = checkers.TestRun()
  test_run.LoadTestCase(TestOnePlusOneEqualsTwo)
  return test_run
コード例 #8
0
def CreateTestRun():
    """Test run that will execute the defined test."""
    test_run = checkers.TestRun()
    test_run.components.Register('calculator', Calculator())
    test_run.LoadTestCase(TestOneTimesOneEqualsOne)
    return test_run
コード例 #9
0
def CreateTestRun():
  """Test run that will execute the defined test."""
  test_run = checkers.TestRun()
  test_run.LoadTestsFromModule(add_tests)
  test_run.LoadTestsFromModule(subtract_tests)
  return test_run