sissaschool / elementpath

XPath 1.0/2.0/3.0/3.1 parsers and selectors for ElementTree and lxml
MIT License
72 stars 20 forks source link

Test regressions on PyPy3 #18

Closed mgorny closed 4 years ago

mgorny commented 4 years ago
$ pypy3 --version
Python 3.6.9 (1608da62bfc71e8ac775121dd0b21bb72e61c6ea, Dec 25 2019, 15:23:23)
[PyPy 7.3.0 with GCC 9.2.0]
======================================================================
FAIL: test_base64_binary_constructor (tests.test_xpath2_constructors.LxmlXPath2ConstructorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/test_xpath2_constructors.py", line 520, in test_base64_binary_constructor
    self.check_value('xs:base64Binary(.)', TypeError, context=context)
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/xpath_test_class.py", line 126, in check_value
    self.assertRaises(expected, root_token.evaluate, context)
AssertionError: TypeError not raised by evaluate

======================================================================
FAIL: test_hex_binary_constructor (tests.test_xpath2_constructors.LxmlXPath2ConstructorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/test_xpath2_constructors.py", line 498, in test_hex_binary_constructor
    self.check_value('xs:hexBinary(.)', TypeError, context=context)
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/xpath_test_class.py", line 126, in check_value
    self.assertRaises(expected, root_token.evaluate, context)
AssertionError: TypeError not raised by evaluate

======================================================================
FAIL: test_base64_binary_constructor (tests.test_xpath2_constructors.XPath2ConstructorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/test_xpath2_constructors.py", line 520, in test_base64_binary_constructor
    self.check_value('xs:base64Binary(.)', TypeError, context=context)
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/xpath_test_class.py", line 126, in check_value
    self.assertRaises(expected, root_token.evaluate, context)
AssertionError: TypeError not raised by evaluate

======================================================================
FAIL: test_hex_binary_constructor (tests.test_xpath2_constructors.XPath2ConstructorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/test_xpath2_constructors.py", line 498, in test_hex_binary_constructor
    self.check_value('xs:hexBinary(.)', TypeError, context=context)
  File "/tmp/portage/dev-python/elementpath-1.4.2/work/elementpath-1.4.2/tests/xpath_test_class.py", line 126, in check_value
    self.assertRaises(expected, root_token.evaluate, context)
AssertionError: TypeError not raised by evaluate
brunato commented 4 years ago

Tests were ran on a previous PyPy 3 version (PyPy 7.1.1-beta0 implementation). Seems to be an implementation bug on codecs.decode(). I will skip this test for PyPy to avoid test failure for runs with another PyPy3 version.

Thanks

brunato commented 4 years ago

A new release (v1.4.3) is available with the skip test workaround for PyPy3 cited in the previous comment.