Пример #1
0
    def testAddGlobalSkipAsItems(self):
        expected_skips = ['1', '2', '3']

        backpy.add_global_skip(backpy.CONFIG_FILE, expected_skips)

        actual_skips = get_config_key(backpy.CONFIG_FILE, SKIP_KEY)

        self.assertCountEqual([','.join(expected_skips)], actual_skips)
Пример #2
0
    def testAppendGlobalSkip(self):
        expected_skips = ['one,two,three']
        backpy.add_global_skip(backpy.CONFIG_FILE, ['one,two'])
        backpy.add_global_skip(backpy.CONFIG_FILE, ['two,three'])

        actual_skips = get_config_key(backpy.CONFIG_FILE, SKIP_KEY)

        self.assertCountEqual(expected_skips, actual_skips)
Пример #3
0
    def testAddGlobalSkipWithWildcards(self):
        expected_skips = ['*.abc,*.def']

        backpy.add_global_skip(backpy.CONFIG_FILE, expected_skips)

        actual_skips = get_config_key(backpy.CONFIG_FILE, SKIP_KEY)

        self.assertCountEqual(expected_skips, actual_skips)
Пример #4
0
    def testAddGlobalSkipAsString(self):
        expected_skips = ['1,2,3']

        backpy.add_global_skip(backpy.CONFIG_FILE, expected_skips)

        actual_skips = get_config_key(backpy.CONFIG_FILE, SKIP_KEY)

        self.assertCountEqual(expected_skips, actual_skips)
Пример #5
0
    def testRemoveGlobalSkip(self):
        added_skips = ['1,2,3,4']
        expected_skips = ['1,3,4']
        backpy.add_global_skip(backpy.CONFIG_FILE, added_skips)

        backpy.delete_global_skip(backpy.CONFIG_FILE, ['2'])

        actual_skips = get_config_key(backpy.CONFIG_FILE, SKIP_KEY)

        self.assertCountEqual(expected_skips, actual_skips)
Пример #6
0
    def testGlobalSkips(self):
        # create fresh index with exclusions
        initial_rules = ['a', 'b', 'c']
        added_rules = ['d,e']
        expected_rules = ['a', 'b', 'c', 'd', 'e']
        backpy.add_global_skip(backpy.CONFIG_FILE, added_rules)
        index = backpy.FileIndex(self.src_root, exclusion_rules=initial_rules)

        actual_rules = index.skips()

        self.assertCountEqual(expected_rules, actual_rules)
Пример #7
0
    def testGlobalSkips(self):
        # create fresh index with exclusions
        initial_rules = ['a', 'b', 'c']
        added_rules = ['d,e']
        expected_rules = ['a', 'b', 'c', 'd', 'e']
        backpy.add_global_skip(backpy.CONFIG_FILE, added_rules)
        index = backpy.FileIndex(self.src_root, exclusion_rules=initial_rules)

        actual_rules = index.skips()

        self.assertCountEqual(expected_rules, actual_rules)
Пример #8
0
 def add_global_skips(self, skips):
     backpy.add_global_skip(backpy.CONFIG_FILE, skips)
Пример #9
0
 def add_global_skips(self, skips):
     backpy.add_global_skip(backpy.CONFIG_FILE, skips)