mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-27 18:25:42 +08:00
use set diff for testing if all examples have been included
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user