test fails after running them twice in a row
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
I don't know if this should be considered an issue. I have edited unittest.py
in order to run the tests more than once in the same Python instance.
What steps will reproduce the problem?
1. Open %your_path_to_python_lib%/unittest.py in your editor
2. Comment all the "sys.exit(...)" you find (there are 2 in mine)
3. Open a Python shell and run:
import PyV8
import unittest
unittest.main(PyV8)
unittest.main(PyV8)
What is the expected output? What do you see instead?
The first "unittest.main(PyV8)" returns:
----------------------------------------------------------------------
Ran 38 tests in 2.902s
OK
The second time, I get:
EF...E......F.........................
======================================================================
ERROR: testMultiNamespace (pyv8.PyV8.TestContext)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pyv8\PyV8.py", line 548, in testMultiNamespace
self.assert_(not bool(JSContext.entered))
JSError: JSError: Entering the V8 API without proper
locking in place
======================================================================
ERROR: testExtension (pyv8.PyV8.TestEngine)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pyv8\PyV8.py", line 1371, in testExtension
self.assertRaises(JSError, ctxt.eval, "hello('flier')")
File "pyv8\PyV8.py", line 467, in __exit__
self.leave()
JSError: JSError: Cannot exit non-entered context
======================================================================
FAIL: testEventDispatch (pyv8.PyV8.TestDebug)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pyv8\PyV8.py", line 1531, in testEventDispatch
self.assertEquals(4, len(self.events))
AssertionError: 4 != 8
======================================================================
FAIL: testLocker (pyv8.PyV8.TestMutithread)
----------------------------------------------------------------------
Traceback (most recent call last):
File "pyv8\PyV8.py", line 1182, in testLocker
self.assertFalse(JSLocker.actived)
AssertionError
----------------------------------------------------------------------
Ran 38 tests in 2.792s
FAILED (failures=2, errors=2)
What version of the product are you using? On what operating system?
OS: Windows Vista
Python 2.6.4
Boost 1_42_0
V8 2.2.19
PyV8 Trunk (rev 269)
Please provide any additional information below.
Again, I don't know if this should be taken seriously, maybe a testcase is not
meant to be run twice and is leaving a JSContext "entered". Thanks.
```
Original issue reported on code.google.com by `mmuradas...@gtempaccount.com` on 23 Jun 2010 at 11:06
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.