Changeset 4763


Ignore:
Timestamp:
Oct 29, 2007, 12:07:14 PM (16 years ago)
Author:
duncan
Message:

adding a check for importing the ANUGA module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/source/anuga/test_all.py

    r4461 r4763  
    121121    return unittest.TestSuite(testCaseClasses)
    122122
     123def check_anuga_import():
     124    try:
     125        # importing something that loads quickly
     126        import anuga.utilities.anuga_exceptions
     127    except ImportError:
     128        print "Python cannot import ANUGA module."
     129        print "Check you have followed all steps of its installation."
     130        import sys; sys.exit()
     131
     132   
    123133if __name__ == '__main__':
     134    check_anuga_import()
    124135    if len(sys.argv) > 1 and sys.argv[1][0].upper() == 'V':
    125136        test_verbose = True
Note: See TracChangeset for help on using the changeset viewer.