def test_geovec_ctor_w_args(self): try: import geovec t = geovec.geovec(self.all_ones) except: self.fail("geovec cannot be constructed with " + str(self.all_ones))
def test_geovec_ctor_w_args(self): try: import geovec t = geovec.geovec(self.all_ones) except: self.fail("geovec cannot be constructed with "+str(self.all_ones))
def test_geovec_default_ctor(self): try: import geovec t = geovec.geovec() except: self.fail("geovec cannot be constructed")
def test_geovec_mag_abs(self): import geovec t = geovec.geovec(self.all_ones) mag = t.mag(abs_sum) self.assertAlmostEqual(mag, 4, 5)
def test_geovec_mag(self): import geovec t = geovec.geovec(self.all_ones) mag = t.mag() self.assertAlmostEqual(mag, 2, 5)
def test_geovec_ctor_fills_any(self): import geovec t = geovec.geovec(self.all_ones, 1) self.assertEqual(len(t.data), len(self.all_ones) + 1) self.assertEqual(t.data, 5 * [1])
def test_instance_geovec_data(self): import geovec t = geovec.geovec(42, 43, 44) self.assertEqual(t.data, [42, 43, 44])
def test_instance_variable_mag(self): import geovec t = geovec.geovec(1, 1, 1, 1) mag = t.mag(abs_norm) self.assertAlmostEqual(mag,4,5)
def test_instance_mag(self): import geovec t = geovec.geovec(1, 1, 1, 1) mag = t.mag() self.assertAlmostEqual(mag,2,5)
def test_instance_geovec_data(self): import geovec t = geovec.geovec(42, 43, 44) self.assertEqual(t.data,[42,43,44])
def test_instance_geovec(self): import geovec t = geovec.geovec()
def test_instance_variable_mag(self): import geovec t = geovec.geovec(1, 1, 1, 1) mag = t.mag(abs_norm) self.assertAlmostEqual(mag, 4, 5)
def test_instance_mag(self): import geovec t = geovec.geovec(1, 1, 1, 1) mag = t.mag() self.assertAlmostEqual(mag, 2, 5)
def test_geovec_ctor_fills(self): import geovec t = geovec.geovec(self.all_ones) self.assertEqual(len(t.data), len(self.all_ones))
def test_geovec_ctor_fills_any(self): import geovec t = geovec.geovec(self.all_ones,1) self.assertEqual(len(t.data), len(self.all_ones)+1) self.assertEqual(t.data,5*[1])
def test_geovec_mag_abs(self): import geovec t = geovec.geovec(self.all_ones) mag = t.mag(abs_sum) self.assertAlmostEqual(mag,4,5)