mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update dukpy
This commit is contained in:
parent
0a5a13afb8
commit
79341ea606
@ -1,5 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from threading import Thread, Event
|
||||
from duktape import dukpy
|
||||
@ -128,9 +129,10 @@ class EvalTests(unittest.TestCase):
|
||||
self.ctx = Context()
|
||||
self.g = self.ctx.g
|
||||
|
||||
self.testfile = 'dukpy_test.js'
|
||||
with open(self.testfile, 'w') as fobj:
|
||||
fobj.write('1+1')
|
||||
with tempfile.NamedTemporaryFile(
|
||||
prefix='dukpy-test-', suffix='.js', delete=False) as fobj:
|
||||
fobj.write(b'1+1')
|
||||
self.testfile = fobj.name
|
||||
|
||||
def tearDown(self):
|
||||
os.remove(self.testfile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user