Skip to content

Commit

Permalink
Added EclKW.typeName() method
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed Apr 4, 2017
1 parent 9e74890 commit 71afbc8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/python/ert/ecl/ecl_kw.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,9 @@ def data_type( self ):
def type_name( self ):
return self.data_type.type_name

def typeName( self ):
return self.data_type.type_name

def getEclType(self):
warnings.warn("EclTypeEnum is deprecated. " +
"You should instead provide an EclDataType",
Expand Down
5 changes: 5 additions & 0 deletions python/tests/core/ecl/test_ecl_kw.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,3 +404,8 @@ def test_resize(self):
for i in range(N/2):
self.assertEqual( kw[i] , i )


def test_typename(self):
kw = EclKW("KW" , 100 , EclDataType.ECL_INT)

self.assertEqual( kw.typeName( ) , "INTE")

0 comments on commit 71afbc8

Please sign in to comment.