def test_polygon_area(self): """test some polygon_area""" assert_almost_equal(polygon_area(self.shp['unit square']),1) assert_almost_equal(polygon_area(self.shp['right tri']),0.5) assert_almost_equal(polygon_area(self.shp['octahedral tri']),0.8660254) assert_almost_equal(polygon_area(self.shp['3D tri']),4.82182538)
def test_polygon_area(self): """test some polygon_area""" assert_almost_equal(polygon_area(self.shp['unit square']), 1) assert_almost_equal(polygon_area(self.shp['right tri']), 0.5) assert_almost_equal(polygon_area(self.shp['octahedral tri']), 0.8660254) assert_almost_equal(polygon_area(self.shp['3D tri']), 4.82182538)
def test_m_func_bc_1v1(): """m_func tests using global vars, i = 0, boundary = 1""" m0 = m_func(0, 1) assert_almost_equal(m0, PTIB[0], 5)
def test_m_func_bc_0v1(): """m_func tests using global vars, i = 0, boundary = 0""" m0 = m_func(0, 0) assert_almost_equal(m0, PTPB[0], 5)
def test_bc1(self): """test i = 0, boundary = 1""" m0 = m_func(0,1) assert_almost_equal(m0, self.PTIB[0], 5)
def test_bc0(self): """test i = 0, boundary = 0""" m0 = m_func(0,0) assert_almost_equal(m0, self.PTPB[0], 5)
def test_m_from_sin_mx_bc_0v2(): """m_from_sin_mx tests, self contained, i = 0, boundary = 0""" m0 = m_from_sin_mx(0, 0) assert_almost_equal(m0, 3.14159, 5)
def test_bc1(self): """test i = 0, boundary = 1""" m0 = m_func(0, 1) assert_almost_equal(m0, self.PTIB[0], 5)
def test_m_from_sin_mx_bc_1v2(): """m_from_sin_mx tests, self contained, i = 0, boundary = 1""" m0 = m_from_sin_mx(0, 1) assert_almost_equal(m0, 1.57080, 5)
def test_m_func_bc_1v2(): """m_func tests, self contained, i = 0, boundary = 1""" m0 = m_func(0, 1) assert_almost_equal(m0, 1.57080, 5)
def test_m_func_bc_0v2(): """m_func tests, self contained, i = 0, boundary = 0""" m0 = m_func(0, 0) assert_almost_equal(m0, 3.14159, 5)
def test_m_from_sin_mx_bc_1v1(): """m_from_sin_mx tests using global vars, i = 0, boundary = 1""" m0 = m_from_sin_mx(0, 1) assert_almost_equal(m0, PTIB[0], 5)
def test_bc0(self): """test i = 0, boundary = 0""" m0 = m_func(0, 0) assert_almost_equal(m0, self.PTPB[0], 5)