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

Class StructureTestCase

                               object --+        
                                        |        
                   unittest.case.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.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

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

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __init__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest, tearDown

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

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)

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUpClass(cls)
Class Method

 

Read in the structure

Overrides: unittest.case.TestCase.setUpClass

tearDownClass(cls)
Class Method

 

Overwrite the structure reference so it can be garbage collected

Overrides: unittest.case.TestCase.tearDownClass

setUp(self)

 

Create a copy of the structure (in case a test accidentally modifies it)

Overrides: unittest.case.TestCase.setUp