Skip to content

Commit

Permalink
monkey patch sys.argv if AttributeError in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Oct 2, 2019
1 parent 8c0e0a7 commit 399c0d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/testing/__init__.py
Expand Up @@ -394,6 +394,11 @@ def start_app(cleanup=True):
except NameError:
myGuiFlag = True # All test will run qgis in gui mode

try:
sys.argv
except AttributeError:
sys.argv = ['']

# In python3 we need to convert to a bytes object (or should
# QgsApplication accept a QString instead of const char* ?)
try:
Expand Down

0 comments on commit 399c0d1

Please sign in to comment.