Пример #1
0
 def test_with_default(self):
     dtmp = _parse_variable_offset_file(CommentReader(open(self.ref_file)))
     self.assertDictEqual(self.expected,dtmp)
Пример #2
0
 def test_only_default(self):
     dtmp =  _parse_variable_offset_file(StringIO.StringIO(self.lines[-1]))
     my_expected = { "default" : 13 }
     self.assertDictEqual(my_expected,dtmp)
Пример #3
0
 def test_no_default(self):
     my_expected = copy.deepcopy(self.expected)
     my_expected.pop("default")
     my_lines = "\n".join(self.lines[:-1]) 
     dtmp = _parse_variable_offset_file(StringIO.StringIO(my_lines))
     self.assertDictEqual(my_expected,dtmp)