Package schrodinger :: Package test :: Module custom_test_classes :: Class StructureTestCase
[hide private]
[frames] | no frames]

Class StructureTestCase

                        unittest.TestCase --+    
                                            |    
custom_assertions.StructureAssertionsTestCase --+
                                                |
                                               StructureTestCase

A unit test class that reads in a structure. This class will only read the structure from disk once (to save time), but will create a new copy of the structure object for each test (to avoid test-test interactions).

The subclass must define the file to read in as class variable STRUCTURE_FILE, and each test will then have access to the structure as self.struc. The setUp() function in any subclass must call super().setUp.

Instance Methods [hide private]
 
setUp(self)
Create a copy of the structure (in case a test accidentally modifies it)

Inherited from custom_assertions.StructureAssertionsTestCase: assertConformersAlmostEqual, assertSameNumberOfAtoms, assertSameStructure

Class Methods [hide private]
 
setUpClass(cls)
Read in the structure
 
tearDownClass(cls)
Overwrite the structure reference so it can be garbage collected
Class Variables [hide private]
  STRUCTURE_FILE = None
hash(x)