From 3db5dcd87f9e4f622d9e02afc34fd61b1d08943c Mon Sep 17 00:00:00 2001 From: Paul Nilsson Date: Mon, 12 Feb 2024 14:49:39 +0100 Subject: [PATCH] Added encoding in write --- pilot/test/test_copytools_mv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilot/test/test_copytools_mv.py b/pilot/test/test_copytools_mv.py index 965a54ca..b085c998 100644 --- a/pilot/test/test_copytools_mv.py +++ b/pilot/test/test_copytools_mv.py @@ -119,7 +119,7 @@ def setUp(self): _data = [random.randint(0, 255) for _ in range(0, filesize)] fname = os.path.join(self.tmp_src_dir, fname) with open(fname, "wb") as new_file: - new_file.write(str(_data)) + new_file.write(str(_data).encode('utf-8')) # add to list #self.filelist.append({'name': fname, 'source': self.tmp_src_dir, 'destination': self.tmp_dst_dir})