Skip to content

loopguard: count trial, nosetests and python -m django test as test runs - #307

Closed
Xinghan Pan (PStarH) wants to merge 1 commit into
microsoft:mainfrom
PStarH:fix-loopguard-trial-nose-django
Closed

Xinghan Pan (PStarH) wants to merge 1 commit into
microsoft:mainfrom
PStarH:fix-loopguard-trial-nose-django

Conversation

@PStarH

Copy link
Copy Markdown

Fixes #291

Summary

The micro-skills observer already reads Twisted's trial, nose's nosetests and python -m nose, and python -m django test as test runs (in runner_heads and runner_modules in microskills/observe.py), and SpiralState already counts trial in TEST_RUN_RE.

However, status_of_tests in loopguard/turn.py did not recognize them because VERIFY_RE did not list them. A failing run after the last edit then left the turn counted as ended green.

Changes

  • In tokeneconomizer/loopguard/turn.py: add trial and nosetests to the runner heads in VERIFY_RE, and add nose and django\s+test to the _PYTHON\s+-m alternation.
  • Add tests/test_loopguard_trial_nose_django.py testing positive verifications, non-run commands (such as trial --help and python -m django runserver), and agreement with the observer.

Verification

All 26 tests in tests/test_loopguard_trial_nose_django.py pass.

The micro-skills observer already reads Twisted's trial, nose's nosetests
and python -m nose, and python -m django test as test runs, and SpiralState
already counts trial. But status_of_tests in loopguard/turn.py read none of
them because VERIFY_RE did not list them. A failing run after the last edit
then left the turn counted as ended green.

Add trial and nosetests to the runner heads, and nose and django test
after python -m.
@PStarH

Copy link
Copy Markdown
Author

Closing in favor of earlier PR #294 by Lanre Shittu (@Shizoqua) which addresses the same issue.

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.

loopguard: trial, nosetests and python -m django test are not counted as test runs

1 participant