Archived
1
0

Merge branch 'feature/GUI' of https://github.com/Recondor/Fourmi into feature/GUI

This commit is contained in:
Harmen Prins 2014-06-17 22:05:40 +02:00
commit c6547f0199
5 changed files with 8 additions and 3 deletions

2
.gitignore vendored
View File

@ -6,6 +6,8 @@
#may contain authentication information #may contain authentication information
sources.cfg sources.cfg
#Another of our config files
GUI/gui.cfg
#THINGS WE WOULD NEVER EVER WANT! #THINGS WE WOULD NEVER EVER WANT!
#ignore thumbnails created by windows #ignore thumbnails created by windows

View File

@ -14,7 +14,7 @@ install:
# command to run tests, e.g. python setup.py test # command to run tests, e.g. python setup.py test
script: script:
- nosetests --with-coverage --cover-package=FourmiCrawler,utils tests - nosetests --with-coverage --cover-package=FourmiCrawler,utils,GUI tests
notifications: notifications:
slack: descartes2:6sgCzx3PvrO9IIMwKxj12dDM slack: descartes2:6sgCzx3PvrO9IIMwKxj12dDM

View File

@ -31,8 +31,11 @@ class ConfigImporter():
return 'Name, Weight' return 'Name, Weight'
class GUI(): class GUI():
def __init__(self, search, config_file='GUI/gui.cfg', sourceloader = None): def __init__(self, search, config_file='GUI/gui.cfg', sourceloader = None, in_source=True):
"""Boots the window, configuration.""" """Boots the window, configuration."""
if in_source:
current_dir = os.path.dirname(os.path.abspath(__file__))
config_file = current_dir + '/' + config_file
self.configurator = ConfigImporter(config_file) self.configurator = ConfigImporter(config_file)
self.sourceloader = sourceloader self.sourceloader = sourceloader
self.finish_with_search = False self.finish_with_search = False

View File

@ -7,7 +7,7 @@ class TestGUI(unittest.TestCase):
pass pass
def test_empty_attributes(self): def test_empty_attributes(self):
self.test_gui = gui.GUI(None, '../GUI/gui.cfg') self.test_gui = gui.GUI(None, '../GUI/gui.cfg.sample', in_source=False)
self.test_gui.window.after(9, self.test_gui.prepare_search) self.test_gui.window.after(9, self.test_gui.prepare_search)
self.test_gui.window.after(11, self.test_gui.window.destroy) self.test_gui.window.after(11, self.test_gui.window.destroy)
self.test_gui.run() self.test_gui.run()