Skip to content

Commit

Permalink
improving qt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cudmore committed Nov 23, 2023
1 parent 2800ddb commit 6af8760
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
# ignore /interface tests, they are running out of memory on github?
pytest --cov=./tests --cov-report=xml --ignore=./tests/interface ./tests
pytest --cov=./tests --cov-report=xml ./tests/interface
pytest -s --cov=./tests --cov-report=xml ./tests/interface
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions sanpy/interface/sanpy_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Author: Robert H Cudmore
# Date: 20190719

# see: https://stackoverflow.com/questions/63871662/python-multiprocessing-freeze-support-error
from multiprocessing import freeze_support
freeze_support()

Expand Down
33 changes: 17 additions & 16 deletions tests/interface/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,30 @@ def test_plugins(qtbot):
_pluginList = pluginsObject.pluginList()
assert len(_pluginList) > 0

# (2) ba loaded but no analysis
# path = 'data/19114001.abf'
path = os.path.join('data', '19114001.abf')
baNoAnalysis = sanpy.bAnalysis(path)

# (3) ba loaded and with analysis
baWithAnalysis = sanpy.bAnalysis(path)
bd = sanpy.bDetection() # gets default
dDict = bd.getDetectionDict('SA Node')
baWithAnalysis.spikeDetect(dDict)

pathSweeps = os.path.join('data', '2021_07_20_0010.abf')
baSweeps = sanpy.bAnalysis(pathSweeps)
dDict = bd.getDetectionDict('Fast Neuron')
baSweeps.spikeDetect(dDict)
if 0:
# (2) ba loaded but no analysis
# path = 'data/19114001.abf'
path = os.path.join('data', '19114001.abf')
baNoAnalysis = sanpy.bAnalysis(path)

# (3) ba loaded and with analysis
baWithAnalysis = sanpy.bAnalysis(path)
bd = sanpy.bDetection() # gets default
dDict = bd.getDetectionDict('SA Node')
baWithAnalysis.spikeDetect(dDict)

pathSweeps = os.path.join('data', '2021_07_20_0010.abf')
baSweeps = sanpy.bAnalysis(pathSweeps)
dDict = bd.getDetectionDict('Fast Neuron')
baSweeps.spikeDetect(dDict)

# github workflow is running out of memory

_numPlugin = len(_pluginList)
for _pluginNumber, _pluginName in enumerate(_pluginList):

continue

if _pluginName != 'Plot Scatter':
continue

Expand Down

0 comments on commit 6af8760

Please sign in to comment.