feat: init
This commit is contained in:
20
test/view/custom_widgets/test_LabelInputWidgetFactory.py
Normal file
20
test/view/custom_widgets/test_LabelInputWidgetFactory.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import tkinter as tk
|
||||
|
||||
|
||||
class NastyVar:
|
||||
def get(self):
|
||||
raise TypeError
|
||||
|
||||
|
||||
def test_label_input_get():
|
||||
from navigate.view.custom_widgets.LabelInputWidgetFactory import LabelInput
|
||||
|
||||
root = tk.Tk()
|
||||
label_input = LabelInput(root)
|
||||
root.update()
|
||||
assert label_input.get() == ""
|
||||
label_input = LabelInput(root, input_var=NastyVar())
|
||||
root.update()
|
||||
assert label_input.get() == ""
|
||||
assert label_input.get(1) == 1
|
||||
root.destroy()
|
||||
Reference in New Issue
Block a user