forked from TomSchimansky/CustomTkinter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_ctk_button.py
More file actions
38 lines (27 loc) · 954 Bytes
/
test_ctk_button.py
File metadata and controls
38 lines (27 loc) · 954 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import time
import customtkinter
class TestCTkButton():
def __init__(self):
self.root_ctk = customtkinter.CTk()
self.ctk_button = customtkinter.CTkButton(self.root_ctk)
self.ctk_button.pack(padx=20, pady=20)
self.root_ctk.title(self.__class__.__name__)
def clean(self):
self.root_ctk.quit()
self.root_ctk.withdraw()
def main(self):
self.execute_tests()
self.root_ctk.mainloop()
def execute_tests(self):
print(f"\n{self.__class__.__name__} started:")
start_time = 0
self.root_ctk.after(start_time, self.test_iconify)
start_time += 1500
self.root_ctk.after(start_time, self.clean)
def test_iconify(self):
print(" -> test_iconify: ", end="")
self.root_ctk.iconify()
self.root_ctk.after(100, self.root_ctk.deiconify)
print("successful")
if __name__ == "__main__":
TestCTkButton().main()