def test_write_string(self):
        test_array = bytearray(_bytearray)
        row = util.DB_Row(test_array, test_spec, layout_offset=4)
        row['NAME'] = 'abc'
        self.assertTrue(row['NAME'] == 'abc')
        row['NAME'] = ''
        self.assertTrue(row['NAME'] == '')
        try:
            row['NAME'] = 'waaaaytoobig'
        except __HOLE__:
            pass
        # value should still be empty
        self.assertTrue(row['NAME'] == '')
dataset/ETHPy150Open gijzelaerr/python-snap7/test/test_util.py/TestS7util.test_write_string