예제 #1
0
 def test_datetimelike_bounded_cell(self):
     point = object()
     cell = Cell(point=object(),
                 bound=[mock.Mock(timetuple=mock.Mock()),
                        mock.Mock(timetuple=mock.Mock())])
     with self.assertRaisesRegexp(TypeError, 'bounded region for datetime'):
         cell.contains_point(point)
예제 #2
0
파일: test_Cell.py 프로젝트: zklaus/iris
 def test_datetimelike_point(self):
     point = mock.Mock(timetuple=mock.Mock())
     cell = Cell(point=object(), bound=[object(), object()])
     with self.assertRaisesRegexp(TypeError, 'bounded region for datetime'):
         cell.contains_point(point)
예제 #3
0
파일: test_Cell.py 프로젝트: zklaus/iris
 def test_PartialDateTime_other(self):
     cell = Cell(datetime.datetime(2010, 3, 2))
     # A few simple cases.
     self.assertEqual(cell, PartialDateTime(month=3))
     self.assertNotEqual(cell, PartialDateTime(month=3, hour=12))
     self.assertNotEqual(cell, PartialDateTime(month=4))