Пример #1
0
 def test_check_bad_imports_second(self):
     ex = 'line: 30, column: 0 the group of imports of standard'\
         ' modules should go first and should not contain spaces'
     result = t.check_imports('import sys', 30, 28)
     self.assertEqual(result[1], ex)
Пример #2
0
 def test_check_bad_import_first(self):
     ex = 'line: 30, column: 10 multiple imports on one line'
     result = t.check_imports('import sys, re', 30, 29)
     self.assertEqual(result[0], ex)
Пример #3
0
 def test_check_bad_imports(self):
     result = t.check_imports('import sys, re', 30)
     self.assertEqual(result,
                      'line: 30, column: 10 multiple imports on one line')
Пример #4
0
 def test_check_good_imports(self):
     result = t.check_imports('import sys', 29, 28)
     self.assertEqual(result[0], '')
Пример #5
0
 def test_check_good_imports(self):
     result = t.check_imports('import sys', 29)
     self.assertEqual(result, None)