| 9 | |
| 10 | # These are used by test_examples.py to discover the examples to run. |
| 11 | def load_example_modules(): |
| 12 | example_modules = {} |
| 13 | for f in os.listdir(os.path.dirname(__file__)): |
| 14 | if not f.endswith('.py') or f == '__init__.py': |
| 15 | continue |
| 16 | modname = f[:-len('.py')] |
| 17 | mod = import_module('.' + modname, package=__name__) |
| 18 | example_modules[modname] = mod |
| 19 | globals()[modname] = mod |
| 20 | |
| 21 | # Remove noise from loop variables. |
| 22 | del f, modname, mod |
| 23 | return example_modules |
| 24 | |
| 25 | |
| 26 | # Columns that we expect to be able to reliably deterministic |