|
24 | 24 | from PyQt5.QtWidgets import QApplication |
25 | 25 | from ReText import readListFromSettings, writeListToSettings, \ |
26 | 26 | readFromSettings, writeToSettings |
27 | | -from ReText.editor import getColor |
| 27 | +from ReText.editor import getColor, updateColorScheme |
28 | 28 |
|
29 | 29 | # For this particular test, QCoreApplication is enough. However, we should |
30 | 30 | # only have one QCoreApplication instance for all tests in a process. As |
@@ -83,10 +83,11 @@ def test_storingColors(self): |
83 | 83 | self.settings.setValue('ColorScheme/htmlTags', 'green') |
84 | 84 | self.settings.setValue('ColorScheme/htmlSymbols', '#ff8800') |
85 | 85 | self.settings.setValue('ColorScheme/htmlComments', '#abc') |
86 | | - self.assertEqual(getColor('htmlTags', self.settings), QColor(0x00, 0x80, 0x00)) |
87 | | - self.assertEqual(getColor('htmlSymbols', self.settings), QColor(0xff, 0x88, 0x00)) |
88 | | - self.assertEqual(getColor('htmlStrings', self.settings), Qt.GlobalColor.darkYellow) # default |
89 | | - self.assertEqual(getColor('htmlComments', self.settings), QColor(0xaa, 0xbb, 0xcc)) |
| 86 | + updateColorScheme(self.settings) |
| 87 | + self.assertEqual(getColor('htmlTags'), QColor(0x00, 0x80, 0x00)) |
| 88 | + self.assertEqual(getColor('htmlSymbols'), QColor(0xff, 0x88, 0x00)) |
| 89 | + self.assertEqual(getColor('htmlStrings'), Qt.GlobalColor.darkYellow) # default |
| 90 | + self.assertEqual(getColor('htmlComments'), QColor(0xaa, 0xbb, 0xcc)) |
90 | 91 |
|
91 | 92 | if __name__ == '__main__': |
92 | 93 | unittest.main() |
0 commit comments