Пример #1
0
 def test_style__pass__nosrcdir_wrong_case(self):
     self.write_config_files(working_config_case_different_nosrc)
     os.system('ls -lR')
     os.system('cat setup.cfg')
     result = validate_codestyle()
     self.assertEqual(result, 1)
Пример #2
0
 def test_style__pass__srcdir_wrong_case__missing(self):
     os.environ['PACKAGE_DIR'] = 'srcz'
     self.write_config_files(working_config_case_different)
     os.system('ls -lR')
     result = validate_codestyle()
     self.assertNotEquals(result, 0)
Пример #3
0
 def test__style__pass__nosrc(self):
     self.write_config_files(working_config_nosrc)
     result = validate_codestyle()
     self.assertEqual(result, 0)
Пример #4
0
 def test__style__fail__srcdir(self):
     os.environ['PACKAGE_DIR'] = 'src'
     self.write_config_files(invalid_style_config)
     result = validate_codestyle()
     self.assertGreater(result, 0)
Пример #5
0
 def test__style__pass__srcdir__args(self):
     os.environ['PACKAGE_DIR'] = 'src'
     os.environ['CODESTYLE_ARGS'] = '--show-source'
     self.write_config_files(working_config)
     result = validate_codestyle()
     self.assertEqual(result, 0)
Пример #6
0
 def test__style__pass__srcdir(self):
     os.environ['PACKAGE_DIR'] = 'src'
     self.write_config_files(working_config)
     result = validate_codestyle()
     self.assertEqual(result, 0)