コード例 #1
0
 def test_can_use_chardet_for_encoding(self):
     command = Command()
     command.set_encodings('chardet')
     command.set_source_patterns(self.pygount_folder)
     command.execute()
コード例 #2
0
 def test_can_set_encoding(self):
     command = Command()
     command.set_encodings('automatic;cp1252')
     self.assertEqual(command.default_encoding, 'automatic')
     self.assertEqual(command.fallback_encoding, 'cp1252')
コード例 #3
0
ファイル: test_command.py プロジェクト: roskakori/pygount
 def test_can_use_chardet_for_encoding(self):
     command = Command()
     command.set_encodings('chardet')
     command.set_source_patterns(self.pygount_folder)
     command.execute()
コード例 #4
0
ファイル: test_command.py プロジェクト: roskakori/pygount
 def test_can_set_encoding(self):
     command = Command()
     command.set_encodings('automatic;cp1252')
     self.assertEqual(command.default_encoding, 'automatic')
     self.assertEqual(command.fallback_encoding, 'cp1252')
コード例 #5
0
 def test_can_use_chardet_for_encoding(self):
     command = Command()
     command.set_encodings("chardet")
     command.set_source_patterns(_PYGOUNT_SOURCE_FOLDER)
     command.execute()
コード例 #6
0
 def test_can_set_encoding(self):
     command = Command()
     command.set_encodings("automatic;cp1252")
     assert command.default_encoding == "automatic"
     assert command.fallback_encoding == "cp1252"