Esempio n. 1
0
 def test_name(self):
     kw = EclKW('TEST', 3, EclDataType.ECL_INT)
     self.assertEqual(kw.name, 'TEST')
     self.assertIn('TEST', repr(kw))
     kw.name = 'SCHMEST'
     self.assertEqual(kw.name, 'SCHMEST')
     self.assertIn('SCHMEST', repr(kw))
Esempio n. 2
0
    def test_long_name(self):
        with self.assertRaises(ValueError):
            EclKW("LONGLONGNAME", 10, EclDataType.ECL_INT)

        kw = EclKW("REGIONS", 10, EclDataType.ECL_INT)
        with self.assertRaises(ValueError):
            kw.name = "LONGLONGNAME"