File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import os
88import unittest
99import cPickle
10+ from diffpy .srreal .tests .testutils import TestCasePeriodictableOptional
1011from diffpy .srreal .atomradiitable import AtomRadiiTable , CovalentRadiiTable
1112from diffpy .srreal .atomradiitable import ConstantRadiiTable
1213
@@ -109,7 +110,7 @@ def test_toString(self):
109110# End of class TestAtomRadiiTable
110111
111112##############################################################################
112- class TestCovalentRadiiTable (unittest . TestCase ):
113+ class TestCovalentRadiiTable (TestCasePeriodictableOptional ):
113114
114115 def setUp (self ):
115116 self .rtb = CovalentRadiiTable ()
Original file line number Diff line number Diff line change 2525 TestCaseObjCrystOptional = object
2626 logging .warning ('Compiled without ObjCryst, pyobjcryst tests skipped.' )
2727
28+ # class TestCasePeriodictableOptional
29+
30+ try :
31+ import periodictable
32+ from unittest import TestCase as TestCasePeriodictableOptional
33+ except ImportError :
34+ TestCasePeriodictableOptional = object
35+ logging .warning ('Cannot import periodictable, periodictable tests skipped.' )
36+ except TypeError :
37+ TestCaseObjCrystOptional = object
38+ logging .warning ('Compiled without ObjCryst, pyobjcryst tests skipped.' )
39+
2840# helper functions
2941
3042def datafile (filename ):
You can’t perform that action at this time.
0 commit comments