~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to tests/py_unit/test_maus_cpp/test_field.py

  • Committer: Christopher Hunt
  • Date: 2015-06-18 14:48:59 UTC
  • mfrom: (697.69.1 merge)
  • mto: (697.69.2 merge_hunt)
  • mto: This revision was merged to the branch mainline in revision 708.
  • Revision ID: christopher.hunt08@imperial.ac.uk-20150618144859-rki5ma1lv8722w41
Merged in latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
                self.assertAlmostEqual(field_value[i], 0., 1e-12)
61
61
        maus_cpp.globals.death()
62
62
 
 
63
    def test_str(self):
 
64
        """Test maus_cpp.Field.get_field_value(...)"""
 
65
        if maus_cpp.globals.has_instance():
 
66
            maus_cpp.globals.death()
 
67
        maus_cpp.globals.birth(self.config)
 
68
        field_string = maus_cpp.field.str(True)
 
69
        self.assertGreater(field_string.find("name: Test_Field"), -1) 
 
70
        field_string = maus_cpp.field.str(False)
 
71
        self.assertGreater(field_string.find("name: Test_Field"), -1) 
 
72
        maus_cpp.globals.death()
 
73
 
63
74
if __name__ == "__main__":
64
75
    unittest.main()
65
76