Skip to content

Commit

Permalink
create iterate_through_examples.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jborbely committed Aug 27, 2017
1 parent 9a37381 commit c27cef8
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions msl/examples/qt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from .loop_until_abort import LoopExample
from .show_standard_icons import ShowStandardIcons
from . import logger
from . import toggle_switch
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ addopts =
--doctest-modules
--ignore setup.py
--ignore test_envs.py
--ignore tests/iterate_through_examples.py
--ignore junk.py
20 changes: 20 additions & 0 deletions tests/iterate_through_examples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Run each example script one at a time.
"""
from msl.qt.prompt import question
import msl.examples.qt as ex

examples = [
ex.LoopExample,
ex.logger.show,
ex.toggle_switch.show,
ex.ShowStandardIcons,
]

count = 1
n = len(examples)
for e in examples:
e()
if n-count > 0 and not question('{} examples remain.\nContinue?'.format(n-count)):
break
count += 1

0 comments on commit c27cef8

Please sign in to comment.