def test_repr(self): rft = EclRFT("WELL", "RFT", datetime.date(2015, 10, 1), 100) pfx = 'EclRFT(completed_cells = 0, date = 2015-10-01, RFT)' self.assertEqual(pfx, repr(rft)[:len(pfx)])
def test_create(self): rft = EclRFT("WELL", "RFT", datetime.date(2015, 10, 1), 100) self.assertEqual(len(rft), 0) with self.assertRaises(IndexError): cell = rft[5]