Example #1
0
 def test_invalid(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     self.assertIs(field1.__eq__('foo'), NotImplemented)
Example #2
0
 def test_not_equal_reals(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19, 38), None)
     self.assertFalse(field1.__eq__(field2))
Example #3
0
 def test_not_equal_data(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19), np.zeros(3))
     self.assertFalse(field1.__eq__(field2))
Example #4
0
 def test_invalid(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     self.assertIs(field1.__eq__('foo'), NotImplemented)
Example #5
0
 def test_equal(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19), None)
     self.assertTrue(field1.__eq__(field2))
Example #6
0
 def test_not_equal_data(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19), np.zeros(3))
     self.assertFalse(field1.__eq__(field2))
Example #7
0
 def test_not_equal_reals(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19, 38), None)
     self.assertFalse(field1.__eq__(field2))
Example #8
0
 def test_equal(self):
     field1 = Field(list(range(45)), list(range(19)), None)
     field2 = Field(np.arange(45), np.arange(19), None)
     self.assertTrue(field1.__eq__(field2))
Example #9
0
 def test_not_equal_ints(self):
     field1 = Field(range(45), range(19), None)
     field2 = Field(range(45, 90), range(19), None)
     self.assertFalse(field1.__eq__(field2))
Example #10
0
 def test_equal(self):
     field1 = Field(range(45), range(19), None)
     field2 = Field(range(45), range(19), None)
     self.assertTrue(field1.__eq__(field2))