| 1 | import unittest |
| 2 | |
| 3 | |
| 4 | class ImportTests(unittest.TestCase): |
| 5 | |
| 6 | def test_import_all(self): |
| 7 | # the following will raise an exception if __all__ contains undefined |
| 8 | # classes |
| 9 | import mechanize |
| 10 | from mechanize import __all__ |
| 11 | for x in __all__: |
| 12 | getattr(mechanize, x) |
| 13 | |
| 14 | |
| 15 | if __name__ == "__main__": |
| 16 | unittest.main() |