Example #1
0
 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'])
Example #2
0
 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'])
Example #3
0
 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'])
Example #4
0
 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'])
Example #5
0
 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'])
Example #6
0
 def test_read_config_no_config(self):
     import check_manifest
     check_manifest.read_config()
     self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])
Example #7
0
 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'])
Example #8
0
 def test_read_config_no_config(self):
     import check_manifest
     check_manifest.read_config()
     self.assertEqual(check_manifest.IGNORE, ['default-ignore-rules'])