Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.11 TestCase #197

Closed
rapgro opened this issue Dec 20, 2021 · 1 comment
Closed

Python 3.11 TestCase #197

rapgro opened this issue Dec 20, 2021 · 1 comment

Comments

@rapgro
Copy link

rapgro commented Dec 20, 2021

Python 3.11 is planned to be included in Fedora 37. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.11.

In assumption assertEquals method got renamed to assertEqual (without letter s).

======================================================================
ERROR: test_11_01_make_run_dictionary (javabridge.tests.test_jutil.TestJutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_jutil.py", line 623, in test_11_01_make_run_dictionary
    self.assertEquals(d["foo"], "bar")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJutil' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_field (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 98, in test_01_02_field
    self.assertEquals(field, (1 << 15)-1)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_03_static_call (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 102, in test_02_03_static_call
    self.assertEquals(c.toString(123), "123")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_04_static_call_varargs (javabridge.tests.test_wrappers.TestJClassWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 110, in test_02_04_static_call_varargs
    self.assertEquals(c.format("Hello, %s.", "world"),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_get_len (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_iterate (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_get_index (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_04_set_index (javabridge.tests.test_wrappers.TestJClassWrapper_Collection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 68, in setUp
    self.assertEquals(len(self.a), 0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Collection' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_int (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 57, in test_01_01_int
    self.assertEquals(int(self.i), 3)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_float (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 60, in test_01_02_float
    self.assertEquals(float(self.i),3.0)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_str (javabridge.tests.test_wrappers.TestJClassWrapper_Unboxing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 63, in test_01_03_str
    self.assertEquals(str(self.i), '3')
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJClassWrapper_Unboxing' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_05_return_value (javabridge.tests.test_wrappers.TestJProxy)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 166, in test_01_05_return_value
    self.assertEquals(J.JWrapper(proxy.o).call(), "foo")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJProxy' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_01_init (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 18, in test_01_01_init
    self.assertEquals(jobj, obj.o)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_02_call_noargs (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 23, in test_01_02_call_noargs
    self.assertEquals(obj.toLowerCase(), "hello, world.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_01_03_call_args (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 29, in test_01_03_call_args
    self.assertEquals(result, "Goodbye cruel world.")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_01_get_field (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 44, in test_02_01_get_field
    self.assertEquals(obj.x, 1.5)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

======================================================================
ERROR: test_02_02_set_field (javabridge.tests.test_wrappers.TestJWrapper)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python-javabridge-1.0.19/javabridge/tests/test_wrappers.py", line 50, in test_02_02_set_field
    self.assertEquals(obj.x, 2.5)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TestJWrapper' object has no attribute 'assertEquals'

----------------------------------------------------------------------
Ran 168 tests in 0.754s

FAILED (errors=17)

Removed many old deprecated unittest features:
TestCase method aliases failUnlessEqual, failIfEqual, failUnless, failIf,
failUnlessRaises, failUnlessAlmostEqual, failIfAlmostEqual (deprecated in
Python 3.1), assertEquals, assertNotEquals, assert_, assertAlmostEquals,
assertNotAlmostEquals, assertRegexpMatches, assertRaisesRegexp (deprecated in
Python 3.2), and assertNotRegexpMatches (deprecated in Python 3.5).

https://bugs.python.org/issue45162
https://docs.python.org/3.11/whatsnew/3.11.html

@hugovk
Copy link

hugovk commented Jan 13, 2022

This has been fixed in commit 61942d2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants