Changeset 1866


Ignore:
Timestamp:
06/27/10 22:06:46 (4 years ago)
Author:
wehart
Message:

Adding test to see if YAML is available

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyutilib.misc/trunk/pyutilib/misc/tests/test_yaml.py

    r1836 r1866  
    1212import pyutilib.th as unittest 
    1313import pyutilib.misc 
     14try: 
     15    import yaml 
     16    using_yaml=True 
     17except ImportError: 
     18    using_yaml=False 
    1419 
    1520 
    1621class Test(unittest.TestCase): 
     22 
     23    def setUp(self): 
     24        if not using_yaml: 
     25            self.skip("Cannot execute test because YAML is not available.") 
    1726 
    1827    def test1(self): 
Note: See TracChangeset for help on using the changeset viewer.