コード例 #1
0
ファイル: test_SyntaxColor.py プロジェクト: syntonym/vai
    def testNonExistentEntryInColorMap(self):
        with patch('vai.paths.pluginsDir') as mock:
            mock.return_value = fixtures.localDir()

            schema = SyntaxColors("default", 8)
            color_map = schema.colorMap()
            self.assertTrue(isinstance(color_map["whatever"], tuple))
            self.assertEqual(len(color_map["whatever"]), 3)
            self.assertTrue(all([ x is None for x in color_map["whatever"]]))
コード例 #2
0
ファイル: test_SyntaxColor.py プロジェクト: syntonym/vai
    def testExistentNonEmpty(self):
        with patch('vai.paths.pluginsDir') as mock:
            mock.return_value = fixtures.localDir()

            schema = SyntaxColors("DeepBlue", 8)
            color_map = schema.colorMap()
            self.assertIsNotNone(color_map)
            self.assertEqual(len(color_map), 1)
            self.assertTrue(isinstance(color_map[token.Keyword], tuple))
            self.assertEqual(len(color_map[token.Keyword]), 3)
コード例 #3
0
ファイル: test_SyntaxColor.py プロジェクト: syntonym/vai
 def testDefault(self):
     schema = SyntaxColors("default", 8)
     self.assertIsNotNone(schema.colorMap())
     self.assertTrue(isinstance(schema.colorMap(), dict))
     self.assertIn(token.Keyword, schema.colorMap().keys())
コード例 #4
0
ファイル: test_SyntaxColor.py プロジェクト: syntonym/vai
 def testUnexistentNonDefault(self):
     schema = SyntaxColors("whatever", 8)
     self.assertIsNotNone(schema.colorMap())
     schema_default = SyntaxColors("default", 8)
     self.assertEqual(schema.colorMap(), schema_default.colorMap())