mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-14 07:25:27 +01:00
Update dukpy
This commit is contained in:
parent
0a5a13afb8
commit
79341ea606
1 changed files with 5 additions and 3 deletions
|
|
@ -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 @@ def setUp(self):
|
|||
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…
Reference in a new issue