Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 18.118.227.199
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib64 /
python2.7 /
lib-tk /
test /
test_ttk /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
0
B
-rw-r--r--
__init__.pyc
140
B
-rw-r--r--
__init__.pyo
140
B
-rw-r--r--
support.py
901
B
-rw-r--r--
support.pyc
1.32
KB
-rw-r--r--
support.pyo
1.32
KB
-rw-r--r--
test_extensions.py
8.97
KB
-rw-r--r--
test_extensions.pyc
8.23
KB
-rw-r--r--
test_extensions.pyo
8.23
KB
-rw-r--r--
test_functions.py
17.06
KB
-rw-r--r--
test_functions.pyc
15.29
KB
-rw-r--r--
test_functions.pyo
15.29
KB
-rw-r--r--
test_style.py
2.7
KB
-rw-r--r--
test_style.pyc
3.07
KB
-rw-r--r--
test_style.pyo
3.07
KB
-rw-r--r--
test_widgets.py
38.94
KB
-rw-r--r--
test_widgets.pyc
37.2
KB
-rw-r--r--
test_widgets.pyo
37.2
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_style.py
import unittest import Tkinter import ttk from test.test_support import requires, run_unittest import support requires('gui') class StyleTest(unittest.TestCase): def setUp(self): self.style = ttk.Style() def test_configure(self): style = self.style style.configure('TButton', background='yellow') self.assertEqual(style.configure('TButton', 'background'), 'yellow') self.assertTrue(isinstance(style.configure('TButton'), dict)) def test_map(self): style = self.style style.map('TButton', background=[('active', 'background', 'blue')]) self.assertEqual(style.map('TButton', 'background'), [('active', 'background', 'blue')]) self.assertTrue(isinstance(style.map('TButton'), dict)) def test_lookup(self): style = self.style style.configure('TButton', background='yellow') style.map('TButton', background=[('active', 'background', 'blue')]) self.assertEqual(style.lookup('TButton', 'background'), 'yellow') self.assertEqual(style.lookup('TButton', 'background', ['active', 'background']), 'blue') self.assertEqual(style.lookup('TButton', 'optionnotdefined', default='iknewit'), 'iknewit') def test_layout(self): style = self.style self.assertRaises(Tkinter.TclError, style.layout, 'NotALayout') tv_style = style.layout('Treeview') # "erase" Treeview layout style.layout('Treeview', '') self.assertEqual(style.layout('Treeview'), [('null', {'sticky': 'nswe'})] ) # restore layout style.layout('Treeview', tv_style) self.assertEqual(style.layout('Treeview'), tv_style) # should return a list self.assertTrue(isinstance(style.layout('TButton'), list)) # correct layout, but "option" doesn't exist as option self.assertRaises(Tkinter.TclError, style.layout, 'Treeview', [('name', {'option': 'inexistent'})]) def test_theme_use(self): self.assertRaises(Tkinter.TclError, self.style.theme_use, 'nonexistingname') curr_theme = self.style.theme_use() new_theme = None for theme in self.style.theme_names(): if theme != curr_theme: new_theme = theme self.style.theme_use(theme) break else: # just one theme available, can't go on with tests return self.assertFalse(curr_theme == new_theme) self.assertFalse(new_theme != self.style.theme_use()) self.style.theme_use(curr_theme) tests_gui = (StyleTest, ) if __name__ == "__main__": run_unittest(*tests_gui)
Close