From 5b78d69c6dd8dd71d2e0f918feb203fa5e811e0a Mon Sep 17 00:00:00 2001 From: Lindsey Heagy Date: Thu, 4 Feb 2016 09:11:23 -0800 Subject: [PATCH] use set diff for testing if all examples have been included --- tests/examples/test_examples.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/examples/test_examples.py b/tests/examples/test_examples.py index 1e1da875..edb5600c 100644 --- a/tests/examples/test_examples.py +++ b/tests/examples/test_examples.py @@ -15,8 +15,11 @@ class compareInitFiles(unittest.TestCase): pyfiles = [] [pyfiles.append(py.rstrip('.py')) for py in files if py.endswith('.py') and py != '__init__.py'] + setdiff = set(pyfiles) - set(Examples.__examples__) - didpass = pyfiles == Examples.__examples__ + print ' Any missing files? ', setdiff + + didpass = (setdiff == set()) self.assertTrue(didpass, "Examples not up to date, run 'python __init__.py' from SimPEG/Examples to update")