Update dukpy

This commit is contained in:
Kovid Goyal 2016-07-03 10:20:06 +05:30 committed by David
parent d2e42dd4a6
commit 0cc5371090

View File

@ -1,5 +1,6 @@
import os import os
import sys import sys
import tempfile
import unittest import unittest
from threading import Thread, Event from threading import Thread, Event
from duktape import dukpy from duktape import dukpy
@ -128,9 +129,10 @@ class EvalTests(unittest.TestCase):
self.ctx = Context() self.ctx = Context()
self.g = self.ctx.g self.g = self.ctx.g
self.testfile = 'dukpy_test.js' with tempfile.NamedTemporaryFile(
with open(self.testfile, 'w') as fobj: prefix='dukpy-test-', suffix='.js', delete=False) as fobj:
fobj.write('1+1') fobj.write(b'1+1')
self.testfile = fobj.name
def tearDown(self): def tearDown(self):
os.remove(self.testfile) os.remove(self.testfile)