Added tests
This commit is contained in:
parent
c0727a2ac7
commit
ad8e3d07cd
@ -28,7 +28,7 @@ class ConfigImporter():
|
|||||||
class GUI():
|
class GUI():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Boots the window, configuration."""
|
"""Boots the window, configuration."""
|
||||||
self.configurator = ConfigImporter(['GUI/gui.cfg','gui.cfg'])
|
self.configurator = ConfigImporter('GUI/gui.cfg')
|
||||||
self.finish_with_search = False
|
self.finish_with_search = False
|
||||||
self.values = {}
|
self.values = {}
|
||||||
self.window, self.variables = self.generate_window(self.load_common_attributes(), self.load_output_types())
|
self.window, self.variables = self.generate_window(self.load_common_attributes(), self.load_output_types())
|
||||||
@ -189,5 +189,3 @@ class GUI():
|
|||||||
self.execute_search()
|
self.execute_search()
|
||||||
else:
|
else:
|
||||||
tkMessageBox.showinfo("Notice", "No search was executed!")
|
tkMessageBox.showinfo("Notice", "No search was executed!")
|
||||||
|
|
||||||
GUI().run()
|
|
@ -12,8 +12,14 @@ class TestGUI(unittest.TestCase):
|
|||||||
test_gui.prepare_search()
|
test_gui.prepare_search()
|
||||||
|
|
||||||
def test_no_configurations(self):
|
def test_no_configurations(self):
|
||||||
test_gui = gui.GUI()
|
import os
|
||||||
#test_gui.
|
config_name = 'gui.cfg'
|
||||||
test_gui.run()
|
with open(config_name) as config_file:
|
||||||
test_gui.prepare_search()
|
file_contents = config_file.read()
|
||||||
|
os.remove(config_name)
|
||||||
|
|
||||||
|
test_gui = gui.GUI()
|
||||||
|
test_gui.finish_with_search = True
|
||||||
|
test_gui.run()
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user