Exemplo n.º 1
0
 def test_logical_rerun_fail(self):
     tests = enqueue_failed_tests(
         get_path('tool_test/rerun_failed_tests',
                  'logical_compare_sql.json', __name__), TEST_DIRECTORY,
         None)
     all_test_results = tdvt_core.run_tests_serial(tests)
     self.check_results(all_test_results, 1, False)
    def test_failed_test_output(self):
        """Make sure TDVT writes the correct output file for rerunning failed tests."""
        all_test_results = {}
        #This will cause the test to fail as expected.
        self.test_config.tested_sql = True
        all_test_results = tdvt_core.run_tests_impl(self.config_set, self.test_config)
        tdvt_core.write_standard_test_output(all_test_results, self.test_dir)

        self.check_results(all_test_results, 1, False)

        #Now rerun the failed tests which should fail again, indicating that the 'tested_sql' option was persisted correctly.

        tests = enqueue_failed_tests(get_path('tool_test', 'tdvt_output.json', __name__), TEST_DIRECTORY, None)
        all_test_results = tdvt_core.run_tests_serial(tests)

        self.check_results(all_test_results, 1, False)
 def test_combined_rerun_local_tests(self):
     tests = enqueue_failed_tests(get_path('tool_test/rerun_failed_tests', 'combined_local.json', __name__), TEST_DIRECTORY, None)
     all_test_results = tdvt_core.run_tests_serial(tests)
     self.check_results(all_test_results, 5)
 def test_expression_rerun(self):
     tests = enqueue_failed_tests(get_path('tool_test/rerun_failed_tests','exprtests.json', __name__), TEST_DIRECTORY, None)
     all_test_results = tdvt_core.run_tests_serial(tests)
     self.check_results(all_test_results, 2)