Пример #1
0
 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))
Пример #2
0
 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))
Пример #3
0
 def test_geovec_default_ctor(self):
     try:
         import geovec
         t = geovec.geovec()
     except:
         self.fail("geovec cannot be constructed")
Пример #4
0
 def test_geovec_mag_abs(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     mag = t.mag(abs_sum)
     self.assertAlmostEqual(mag, 4, 5)
Пример #5
0
 def test_geovec_mag(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     mag = t.mag()
     self.assertAlmostEqual(mag, 2, 5)
Пример #6
0
 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])
Пример #7
0
 def test_instance_geovec_data(self):
     import geovec
     t = geovec.geovec(42, 43, 44)
     self.assertEqual(t.data, [42, 43, 44])
Пример #8
0
 def test_geovec_mag(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     mag = t.mag()
     self.assertAlmostEqual(mag, 2, 5)
Пример #9
0
 def test_geovec_default_ctor(self):
     try:
         import geovec
         t = geovec.geovec()
     except:
         self.fail("geovec cannot be constructed")
Пример #10
0
 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)
Пример #11
0
 def test_instance_mag(self):
     import geovec
     t = geovec.geovec(1, 1, 1, 1)
     mag = t.mag()
     self.assertAlmostEqual(mag,2,5)
Пример #12
0
 def test_instance_geovec_data(self):
     import geovec
     t = geovec.geovec(42, 43, 44)
     self.assertEqual(t.data,[42,43,44])
Пример #13
0
 def test_instance_geovec(self):
     import geovec
     t = geovec.geovec()
Пример #14
0
 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)
Пример #15
0
 def test_instance_mag(self):
     import geovec
     t = geovec.geovec(1, 1, 1, 1)
     mag = t.mag()
     self.assertAlmostEqual(mag, 2, 5)
Пример #16
0
 def test_geovec_ctor_fills(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     self.assertEqual(len(t.data), len(self.all_ones))
Пример #17
0
 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])
Пример #18
0
 def test_geovec_ctor_fills(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     self.assertEqual(len(t.data), len(self.all_ones))
Пример #19
0
 def test_geovec_mag_abs(self):
     import geovec
     t = geovec.geovec(self.all_ones)
     mag = t.mag(abs_sum)
     self.assertAlmostEqual(mag,4,5)
Пример #20
0
 def test_instance_geovec(self):
     import geovec
     t = geovec.geovec()