made the peter requested changes

This commit is contained in:
cis 2021-07-20 14:43:55 +05:30
parent 52b6d14ab2
commit fddd054d56
No known key found for this signature in database
GPG Key ID: 11DC6F36E8B65B24
3 changed files with 18 additions and 22 deletions

View File

@ -1,6 +1,5 @@
Kivy==2.0.0
kivy-garden.qrcode==2021.314
kivy-garden.qrcode
-e git+https://github.com/kivymd/KivyMD#egg=kivymd
opencv-python==4.5.1.48
pyzbar==0.1.8
telenium==0.5.0
opencv-python
pyzbar
telenium

View File

@ -19,18 +19,16 @@ tmp_db_file = (
)
def cleanup(home=None, files=_files):
def cleanup(files=_files):
"""Cleanup application files"""
if not home:
home = tempfile.gettempdir()
for pfile in files:
try:
os.remove(os.path.join(home, pfile))
os.remove(os.path.join(tempfile.gettempdir(), pfile))
except OSError:
pass
def set_temp_data():
def populate_test_data():
"""Set temp data in tmp directory"""
for file_name in tmp_db_file:
old_source_file = os.path.join(
@ -47,7 +45,7 @@ class TeleniumTestProcess(TeleniumTestCase):
def setUpClass(cls):
"""Setupclass is for setting temp environment"""
os.environ["BITMESSAGE_HOME"] = tempfile.gettempdir()
set_temp_data()
populate_test_data()
super(TeleniumTestProcess, cls).setUpClass()
@classmethod

View File

@ -6,18 +6,17 @@ from threads import sqlThread
def main():
if state.enableObjProc:
# Start the address generation thread
addressGeneratorThread = FakeAddressGenerator()
# close the main program even if there are threads left
addressGeneratorThread.daemon = True
addressGeneratorThread.start()
# Start the address generation thread
addressGeneratorThread = FakeAddressGenerator()
# close the main program even if there are threads left
addressGeneratorThread.daemon = True
addressGeneratorThread.start()
sqlLookup = sqlThread()
# DON'T close the main program even if there are threads left.
# The closeEvent should command this thread to exit gracefully.
sqlLookup.daemon = False
sqlLookup.start()
sqlLookup = sqlThread()
# DON'T close the main program even if there are threads left.
# The closeEvent should command this thread to exit gracefully.
sqlLookup.daemon = False
sqlLookup.start()
state.kivyapp = NavigateApp()
state.kivyapp.run()