From f05ff6fbf9331cfabb29d2048143c4ff16045dcb Mon Sep 17 00:00:00 2001 From: Ogi Date: Sat, 8 Jun 2019 08:07:47 -0700 Subject: [PATCH] Restore duplicate entries in examples app, but test_examples does not duplicate tests --- examples/test_examples.py | 8 ++++---- examples/utils.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/test_examples.py b/examples/test_examples.py index 61d60d88..97809653 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -40,7 +40,7 @@ if os.getenv('TRAVIS') is not None: print("Installed wrapper for flaky print.") -files = utils.buildFileList(utils.examples) +files = sorted(set(utils.buildFileList(utils.examples))) frontends = {Qt.PYQT4: False, Qt.PYQT5: False, Qt.PYSIDE: False, Qt.PYSIDE2: False} # sort out which of the front ends are available for frontend in frontends.keys(): @@ -50,7 +50,7 @@ for frontend in frontends.keys(): except ImportError: pass -installed = sorted([frontend for frontend, isPresent in frontends.items() if isPresent]) +installedFrontends = sorted([frontend for frontend, isPresent in frontends.items() if isPresent]) exceptionCondition = namedtuple("exceptionCondition", ["condition", "reason"]) conditionalExampleTests = { @@ -67,9 +67,9 @@ conditionalExampleTests = { marks=pytest.mark.skipif(conditionalExampleTests[f[1]].condition is False, reason=conditionalExampleTests[f[1]].reason) if f[1] in conditionalExampleTests.keys() else (), ) - for frontend, f, in itertools.product(installed, files) + for frontend, f, in itertools.product(installedFrontends, files) ], - ids = [" {} - {} ".format(f[1], frontend) for frontend, f in itertools.product(installed, files)] + ids = [" {} - {} ".format(f[1], frontend) for frontend, f in itertools.product(installedFrontends, files)] ) def testExamples(frontend, f, graphicsSystem=None): # runExampleFile(f[0], f[1], sys.executable, frontend) diff --git a/examples/utils.py b/examples/utils.py index cf147fb5..494b686b 100644 --- a/examples/utils.py +++ b/examples/utils.py @@ -15,7 +15,9 @@ examples = OrderedDict([ ('Data Slicing', 'DataSlicing.py'), ('Plot Customization', 'customPlot.py'), ('Image Analysis', 'imageAnalysis.py'), + ('ViewBox Features', 'ViewBoxFeatures.py'), ('Dock widgets', 'dockarea.py'), + ('Console', 'ConsoleWidget.py'), ('Histograms', 'histogram.py'), ('Beeswarm plot', 'beeswarm.py'), ('Symbols', 'Symbols.py'),