Skip to content

Commit

Permalink
Move app to test init
Browse files Browse the repository at this point in the history
  • Loading branch information
percurnicus committed Jun 28, 2017
1 parent 0698230 commit c4b071b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 0 additions & 6 deletions pdsspect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
import sys
from qtpy import QtWidgets

app = QtWidgets.QApplication.instance()
if not app:
app = QtWidgets.QApplication(sys.argv)
2 changes: 1 addition & 1 deletion pdsspect/pdsspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from qtpy import QtWidgets, QtCore

from . import app
from .basic import Basic
from .selection import Selection
from .transforms import Transforms
Expand Down Expand Up @@ -170,6 +169,7 @@ def pdsspect(inlist=None):
>>> pdsspect (['a1.img, b3.img, c1.img, d*img'])
You can also pass in a list of files/globs
"""
app = QtWidgets.QApplication(sys.argv)
files = []
if isinstance(inlist, list):
if inlist:
Expand Down
7 changes: 7 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
import sys
from qtpy import QtWidgets

test_dir = os.path.join('tests', 'mission_data')

Expand Down Expand Up @@ -32,3 +34,8 @@
SAMPLE_ROI = os.path.join(
'tests', 'sample_roi.npz'
)


app = QtWidgets.QApplication.instance()
if not app:
app = QtWidgets.QApplication(sys.argv)

0 comments on commit c4b071b

Please sign in to comment.