File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 7
7
import os
8
8
import unittest
9
9
import cPickle
10
+ from diffpy .srreal .tests .testutils import TestCasePeriodictableOptional
10
11
from diffpy .srreal .atomradiitable import AtomRadiiTable , CovalentRadiiTable
11
12
from diffpy .srreal .atomradiitable import ConstantRadiiTable
12
13
@@ -109,7 +110,7 @@ def test_toString(self):
109
110
# End of class TestAtomRadiiTable
110
111
111
112
##############################################################################
112
- class TestCovalentRadiiTable (unittest . TestCase ):
113
+ class TestCovalentRadiiTable (TestCasePeriodictableOptional ):
113
114
114
115
def setUp (self ):
115
116
self .rtb = CovalentRadiiTable ()
Original file line number Diff line number Diff line change 25
25
TestCaseObjCrystOptional = object
26
26
logging .warning ('Compiled without ObjCryst, pyobjcryst tests skipped.' )
27
27
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
+
28
40
# helper functions
29
41
30
42
def datafile (filename ):
You can’t perform that action at this time.
0 commit comments