def test_options(self): """Check option loading.""" # test default value options = get_options({}) assert options['excludes'] == [] # test set excludes options = get_options({'EXCLUDES': self.legacy_regex_1}) assert options['excludes'] == self.legacy_regex_1
def test_check_file(self): """Test check_file().""" options_1 = get_options({'EXCLUDES': self.legacy_regex_1}) options_2 = get_options({'EXCLUDES': self.legacy_regex_2}) assert check_file(filename=self.file_1, **options_1) is not None assert check_file(filename=self.file_1, **options_2) is not None assert check_file(filename=self.file_2, **options_1) is not None assert check_file(filename=self.file_2, **options_2) is None assert check_file(filename=self.file_3, **options_1) is None assert check_file(filename=self.file_3, **options_2) is None