Пример #1
0
    def test_should_pick_up_title_as_suite_name(self):
        input = """
        yaml_test_suite:

        """
        result = from_yaml(input)

        assert_that(result.total_test_count, is_(0))
        assert_that(result.suites[0].name, is_("yaml_test_suite"))
Пример #2
0
    def test_should_create_tests_from_name_attribute_in_sublist(self):
        input = """
        yaml_test_suite:
            my_awesome_test:

        """
        result = from_yaml(input)

        assert_that(result.total_test_count, is_(1))
Пример #3
0
    def test_should_create_test_suite_for_each_top_level_entry(self):
        input = """
        yaml_test_suite:

        xml_test_suite:

        """
        result = from_yaml(input)
        assert_that(result.suites, has_length(2))
Пример #4
0
    def test_should_mark_tests_with_skipped_status_as_such(self):
        input = """
        yaml_test_suite:
          known_bad_test:
            status: skipped
            message: I'm known bad
        """
        result = from_yaml(input)

        assert_that(result.suites[0].skipped_count, is_(1))
Пример #5
0
    def test_should_mark_tests_with_error_status_as_such(self):
        input = """
        yaml_test_suite:
          erronous_test:
            status: error
            message: I had an error
        """
        result = from_yaml(input)

        assert_that(result.suites[0].error_count, is_(1))
Пример #6
0
    def test_should_mark_tests_with_failed_status_as_such(self):
        input = """
        yaml_test_suite:
          failing_test:
            status: failed
            message: I had a failure
        """
        result = from_yaml(input)

        assert_that(result.suites[0].failed_count, is_(1))
Пример #7
0
def when_i_convert_it_to_xml(step):
    world.CurrentXml = py_x.from_yaml(world.CurrentYaml)