Commit 3be8587f authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Up field test base class with rewrite methods

The two additional convinience methods facilitate the modification of
fields other than the (now) optional field derived field test classes
parent 6bdb5b81
......@@ -204,14 +204,22 @@ class TestField(object):
def setValue(self, value):
"""Set the value of the represented field"""
nr = h5.File(
nr.attrs[] = value
self.setNamedField(, value)
def setOutput(self, output):
"""Set the output line of `lvcnrcheck` for the represented field"""
self.setNamedOutput(, output)
def setNamedField(self, name, value):
"""Set the value of the named field"""
nr = h5.File(
nr.attrs[name] = value
def setNamedOutput(self, name, output):
"""Set the output line of `lvcnrcheck` for the named field"""
self.output = re.sub(
r'^- \[=\] {0:s} .*?$'.format(,
r'^- \[=\] {0:s} .*?$'.format(name),
output, self.output, flags=re.MULTILINE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment