def test_get_area_complex(self): ''' As the get area class simply implements the get_area() method of :class: openquake.hazardlib.geo.surface.complex_fault. ComplexFaultSurface this test simply checks that it is called. ''' self.fault = ComplexFaultGeometry(self.edges, 1.0) self.assertAlmostEqual(2767.2418367330, self.fault.get_area(), 5)
def test_instantiation_complex(self): ''' Tests instantiation of the class ''' self.fault = ComplexFaultGeometry(self.edges, 1.0) self.assertTrue( isinstance(self.fault.surface, complex_fault.ComplexFaultSurface)) self.assertEqual(self.fault.typology, 'Complex') self.assertAlmostEqual(self.fault.dip, 30.8283885, 5)