The b prefix works since python2.6
This commit is contained in:
parent
0b03733c65
commit
1756e534ad
@ -1,5 +1,4 @@
|
||||
import os
|
||||
import sys
|
||||
import imp
|
||||
import tempfile
|
||||
from hy.importer import write_hy_as_pyc
|
||||
@ -8,10 +7,7 @@ from hy.importer import write_hy_as_pyc
|
||||
def test_pyc():
|
||||
"""Test pyc compilation."""
|
||||
f = tempfile.NamedTemporaryFile(suffix='.hy', delete=False)
|
||||
if sys.version_info[0] >= 3:
|
||||
f.write(b'(defn pyctest [s] s)')
|
||||
else:
|
||||
f.write('(defn pyctest [s] s)')
|
||||
f.close()
|
||||
|
||||
write_hy_as_pyc(f.name)
|
||||
|
Loading…
Reference in New Issue
Block a user