File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717"""
1818
1919
20+ # create logger instance for the tests subpackage
21+ import logging
22+
23+ logging .basicConfig ()
24+ logger = logging .getLogger (__name__ )
25+ del logging
26+
2027
2128def testsuite ():
2229 '''Build a unit tests suite for the diffpy.srreal package.
Original file line number Diff line number Diff line change 1010"""
1111
1212
13- import logging
14-
1513from diffpy .srreal .structureconverters import convertObjCrystCrystal
14+ from diffpy .srreal .tests import logger
1615
1716# class TestCaseObjCrystOptional
1817
2221 convertObjCrystCrystal (pyobjcryst .crystal .Crystal ())
2322except ImportError :
2423 TestCaseObjCrystOptional = object
25- logging .warning ('Cannot import pyobjcryst, pyobjcryst tests skipped.' )
24+ logger .warning ('Cannot import pyobjcryst, pyobjcryst tests skipped.' )
2625except TypeError :
2726 TestCaseObjCrystOptional = object
28- logging .warning ('Compiled without ObjCryst, pyobjcryst tests skipped.' )
27+ logger .warning ('Compiled without ObjCryst, pyobjcryst tests skipped.' )
2928
3029# class TestCasePeriodictableOptional
3130
3433 from unittest import TestCase as TestCasePeriodictableOptional
3534except ImportError :
3635 TestCasePeriodictableOptional = object
37- logging .warning ('Cannot import periodictable, periodictable tests skipped.' )
36+ logger .warning ('Cannot import periodictable, periodictable tests skipped.' )
3837
3938# helper functions
4039
You can’t perform that action at this time.
0 commit comments