clean sys.argv, because if test is running from pytest
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Sat, 16 Sep 2017 21:22:06 +0300
changeset 1817 ff0c18be4a8b
parent 1816 724722c03db4
child 1818 925ea35edc2c
clean sys.argv, because if test is running from pytest
sys.argv contains string "pytest --timeout 0 ./tests/tools"
Beremiz application parses it and throws exception.
tests/tools/test_application.py
--- a/tests/tools/test_application.py	Sat Sep 16 21:19:19 2017 +0300
+++ b/tests/tools/test_application.py	Sat Sep 16 21:22:06 2017 +0300
@@ -148,6 +148,7 @@
 
     def testStartUp(self):
         """Checks whether the app starts and finishes correctly"""
+        sys.argv = [""]
         self.StartApp()
         self.FinishApp()