We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, AssertionError occurred in tests during the build process in Debian sid. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1088761
> self.assertEqual(dir(self.container), ['__contains__', '__delitem__', '__dict__', '__dir__', '__doc__', '__getattr__', '__getitem__', '__getstate__', '__init__', '__iter__', '__len__', '__module__', '__setitem__', '__setstate__', '__weakref__', '_check_for_name_attribute', '_reindex', 'append', 'blub', 'clear', 'extend', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', 'itervalues', 'keys', 'update_key', 'values']) E AssertionError: Lists differ: ['__c[59 chars], '__firstlineno__', '__getattr__', '__getitem[323 chars]ues'] != ['__c[59 chars], '__getattr__', '__getitem__', '__getstate__'[279 chars]ues']
Following patch should fix the issue,
--- a/src/optlang/tests/test_container.py +++ b/src/optlang/tests/test_container.py @@ -47,12 +47,17 @@ class ContainerTestCase(unittest.TestCas var = Variable('blub') self.container.append(var) print(dir(self.container)) - self.assertEqual(dir(self.container), - ['__contains__', '__delitem__', '__dict__', '__dir__', '__doc__', '__getattr__', '__getitem__', - '__getstate__', '__init__', '__iter__', '__len__', '__module__', '__setitem__', - '__setstate__', '__weakref__', '_check_for_name_attribute', '_reindex', 'append', 'blub', - 'clear', 'extend', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', 'iterkeys', - 'itervalues', 'keys', 'update_key', 'values']) + expected_attributes = { + '__contains__', '__delitem__', '__dict__', '__dir__', '__doc__', + '__getattr__', '__getitem__', '__getstate__', '__init__', '__iter__', + '__len__', '__module__', '__setitem__', '__setstate__', '__weakref__', + '_check_for_name_attribute', '_reindex', 'append', 'blub', 'clear', + 'extend', 'fromkeys', 'get', 'has_key', 'items', 'iteritems', + 'iterkeys', 'itervalues', 'keys', 'update_key', 'values' + } + actual_attributes = set(dir(self.container)) + self.assertTrue(expected_attributes.issubset(actual_attributes), + msg=f"Missing attributes: {expected_attributes - actual_attributes}") def test_del_by_index(self): variables_iterable = [Variable("v" + str(i), lb=10, ub=100) for i in range(1000)]
The text was updated successfully, but these errors were encountered:
Thank you for the suggestion @NGC2023. I believe, this will be addressed by #276 already.
Sorry, something went wrong.
No branches or pull requests
Hi,
AssertionError occurred in tests during the build process in Debian sid. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1088761
Following patch should fix the issue,
The text was updated successfully, but these errors were encountered: