Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: Call endLoopIteration when isTrials is False so loop can be broken #2517

Merged
merged 1 commit into from Jul 10, 2019

Conversation

dvbridges
Copy link
Contributor

The endLoopIteration was not being called when isTrials was false, meaning
that the loop could not be broken using loop.finished. Adding the
endLoopIteration function to loops where isTrials is false means that the
a new arg isTrials must be passed, because isTrials never actually
exists in the thisTrials arg, so can not satisfy the else if statement,
and thisTrial can be both defined and undefined when isTrials is false,
meaning nextEntry could be called when it should not be. Now,
endLoopIteration will only call nextEntry if isTrials is true if not
trying to break loop manually.

The endLoopIteration was not being called when isTrials was false, meaning
that the loop could not be broken using loop.finished. Adding the
endLoopIteration function to loops where isTrials is false means that the
a new arg `isTrials` must be passed, because `isTrials` never actually
exists in the `thisTrials` arg, so can not satisfy the else if statement,
and thisTrial can be both defined and undefined when isTrials is false,
meaning nextEntry could be called when it should not be. Now,
endLoopIteration will only call nextEntry if isTrials is true if not
trying to break loop manually.
@coveralls
Copy link

Coverage Status

Coverage decreased (-4.0e-05%) to 49.224% when pulling 44f42c9 on dvbridges:endLoopFix into c638918 on psychopy:master.

@codecov-io
Copy link

codecov-io commented Jul 5, 2019

Codecov Report

Merging #2517 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2517      +/-   ##
=========================================
+ Coverage    44.5%   44.5%   +<.01%     
=========================================
  Files         232     232              
  Lines       40291   40289       -2     
  Branches     6925    6924       -1     
=========================================
  Hits        17931   17931              
+ Misses      20462   20460       -2     
  Partials     1898    1898
Impacted Files Coverage Δ
psychopy/experiment/loops.py 59.2% <100%> (-0.33%) ⬇️
...sychopy/experiment/components/settings/__init__.py 76.11% <100%> (ø) ⬆️
psychopy/app/dialogs.py 27.68% <0%> (ø) ⬆️
psychopy/tools/wizard.py 73.74% <0%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c638918...44f42c9. Read the comment docs.

@peircej peircej merged commit 657601b into psychopy:master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants