mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
Skip a test correctly for the C-version. The decorator doesn't really work
because it evaluates its condition before pyET is even set by test_main. Therefore, the check it moved to "runtime".
This commit is contained in:
commit
d7e2666449
1 changed files with 4 additions and 1 deletions
|
@ -2420,8 +2420,11 @@ class KeywordArgsTest(unittest.TestCase):
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
@unittest.skipUnless(pyET, 'only for the Python version')
|
|
||||||
class NoAcceleratorTest(unittest.TestCase):
|
class NoAcceleratorTest(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
if not pyET:
|
||||||
|
raise SkipTest('only for the Python version')
|
||||||
|
|
||||||
# Test that the C accelerator was not imported for pyET
|
# Test that the C accelerator was not imported for pyET
|
||||||
def test_correct_import_pyET(self):
|
def test_correct_import_pyET(self):
|
||||||
self.assertEqual(pyET.Element.__module__, 'xml.etree.ElementTree')
|
self.assertEqual(pyET.Element.__module__, 'xml.etree.ElementTree')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue