def test_read_config_override_ignores(self): import check_manifest with open('setup.cfg', 'w') as f: f.write('[check-manifest]\nignore = foo\n\n bar\n') f.write('ignore-default-rules = yes\n') check_manifest.read_config() self.assertEqual(check_manifest.IGNORE, ['foo', 'bar'])
def test_read_config_extra_ignores(self): import check_manifest with open('setup.cfg', 'w') as f: f.write('[check-manifest]\nignore = foo\n bar\n') check_manifest.read_config() self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules', 'foo', 'bar'])
def test_read_config_no_option(self): import check_manifest with open('setup.cfg', 'w') as f: f.write('[check-manifest]\n') check_manifest.read_config() self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
def test_read_config_no_config(self): import check_manifest check_manifest.read_config() self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])