[Python-checkins] r58172 - sandbox/trunk/import_in_py/Py3K/tests/test_fs_loader.py
brett.cannon
python-checkins at python.org
Mon Sep 17 01:13:16 CEST 2007
Author: brett.cannon
Date: Mon Sep 17 01:13:16 2007
New Revision: 58172
Modified:
sandbox/trunk/import_in_py/Py3K/tests/test_fs_loader.py
Log:
Move over to using bytes literals.
Modified: sandbox/trunk/import_in_py/Py3K/tests/test_fs_loader.py
==============================================================================
--- sandbox/trunk/import_in_py/Py3K/tests/test_fs_loader.py (original)
+++ sandbox/trunk/import_in_py/Py3K/tests/test_fs_loader.py Mon Sep 17 01:13:16 2007
@@ -278,9 +278,9 @@
def change_magic():
with open(self.pyc_path, 'rb') as bytecode_file:
data = bytecode_file.read()
- assert imp.get_magic() != '0' * 4
+ assert imp.get_magic() != b'0000'
with open(self.pyc_path, 'wb') as bytecode_file:
- bytecode_file.write('0' * 4)
+ bytecode_file.write(b'0000')
bytecode_file.write(data[4:])
# With source.
change_magic()
@@ -379,8 +379,8 @@
with open(self.pyc_path, 'rb') as bytecode_file:
data = bytecode_file.read()
with open(self.pyc_path, 'wb') as bytecode_file:
- bytecode_file.write('0' * 4)
- bytecode_file.write('0' * 4)
+ bytecode_file.write(b'0000')
+ bytecode_file.write(b'0000')
bytecode_file.write(data[8:])
loader = importlib._PyFileLoader(self.module_name, self.pyc_path,
False)
More information about the Python-checkins
mailing list