def test_read_statusfile_section_variant(self):
        rules, prefix_rules = statusfile.ReadStatusFile(
            TEST_STATUS_FILE % 'system==linux and variant==default',
            make_variables(),
        )

        self.assertEquals(
            {
                'foo/bar': set(['PASS', 'SKIP']),
                'baz/bar': set(['PASS', 'FAIL']),
            },
            rules[''],
        )
        self.assertEquals(
            {
                'foo/': set(['PASS', 'SLOW']),
            },
            prefix_rules[''],
        )
        self.assertEquals(
            {
                'baz/bar': set(['PASS', 'SLOW']),
            },
            rules['default'],
        )
        self.assertEquals(
            {
                'foo/': set(['FAIL']),
            },
            prefix_rules['default'],
        )
Пример #2
0
    def test_read_statusfile_section_true(self):
        rules, wildcards = statusfile.ReadStatusFile(
            TEST_STATUS_FILE % 'system==linux', make_variables())

        self.assertEquals(
            {
                'foo/bar': set(['PASS', 'SKIP']),
                'baz/bar': set(['PASS', 'FAIL', 'SLOW']),
            },
            rules[''],
        )
        self.assertEquals(
            {
                'foo/*': set(['SLOW', 'FAIL']),
            },
            wildcards[''],
        )
        self.assertEquals({}, rules['default'])
        self.assertEquals({}, wildcards['default'])