~jan.greis/maus/straighttemp

« back to all changes in this revision

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

  • Committer: Jan Greis
  • Date: 2015-06-29 09:07:42 UTC
  • mfrom: (697.2.8 release)
  • Revision ID: j.r.greis@warwick.ac.uk-20150629090742-3mnfledv3r24bka9
MergeĀ fromĀ 0.9.6

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