Skip to content

Commit

Permalink
added test for extends and attributes attribute for projection
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Sampson committed Jun 10, 2016
1 parent 8410e0e commit e80d686
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions Packages/vcs/vcs/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ def list(self):
print 'name =', self.name
print 'type =', self.type
# print 'parameters =',self.parameters

for att in self.attributes:
print att, '=', getattr(self, att)

@property
def attributes(self):
p = []
if self._type in [3, 4]:
p.append('smajor')
Expand Down Expand Up @@ -455,8 +461,7 @@ def list(self):
p.append('centerlatitude')
p.append('falseeasting')
p.append('falsenorthing')
for att in p:
print att, '=', getattr(self, att)
return p

##########################################################################
# #
Expand Down
6 changes: 4 additions & 2 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ foreach(lat_0 45 90)
${lat_0}
)
endforeach()


cdat_add_test(test_vcs_extends
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_extends.py
)
cdat_add_test(test_vcs_create_get
"${PYTHON_EXECUTABLE}"
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_create_get.py
Expand Down
Empty file added testing/vcs/test_vcs_extends.py
Empty file.

0 comments on commit e80d686

Please sign in to comment.