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

Issues with pytest 8 #1995

Closed
frenzymadness opened this issue May 14, 2024 · 1 comment · Fixed by #1996
Closed

Issues with pytest 8 #1995

frenzymadness opened this issue May 14, 2024 · 1 comment · Fixed by #1996

Comments

@frenzymadness
Copy link
Contributor

When I run the tests with pytest 8, I get the following errors:

=================================== FAILURES ===================================
_______________________ TestSetupReadline.test_colorama ________________________

self = <test.test_utils.TestSetupReadline testMethod=test_colorama>

    def test_colorama(self):
        """
        Only test it if colorama library is available.
    
        This module is being tested because it uses ``setattr`` at some point,
        which Jedi doesn't understand, but it should still work in the REPL.
        """
        try:
            # if colorama is installed
            import colorama
        except ImportError:
            pass
        else:
            self.namespace.colorama = colorama
>           assert self.complete('colorama')
E           AssertionError: assert []
E            +  where [] = <bound method TestSetupReadline.complete of <test.test_utils.TestSetupReadline testMethod=test_colorama>>('colorama')
E            +    where <bound method TestSetupReadline.complete of <test.test_utils.TestSetupReadline testMethod=test_colorama>> = <test.test_utils.TestSetupReadline testMethod=test_colorama>.complete

test/test_utils.py:113: AssertionError
________________________ TestSetupReadline.test_modules ________________________

self = <test.test_utils.TestSetupReadline testMethod=test_modules>

    def test_modules(self):
        import sys
        import os
        self.namespace.sys = sys
        self.namespace.os = os
    
        try:
>           assert self.complete('os.path.join') == ['os.path.join']
E           AssertionError: assert [] == ['os.path.join']
E             
E             Right contains one more item: 'os.path.join'
E             Use -v to get more diff

test/test_utils.py:54: AssertionError
__________________ TestSetupReadline.test_preexisting_values ___________________

self = <test.test_utils.TestSetupReadline testMethod=test_preexisting_values>

    def test_preexisting_values(self):
        self.namespace.a = range(10)
>       assert set(self.complete('a.')) == {'a.' + n for n in dir(range(1))}
E       AssertionError: assert set() == {'a.__bool__'...__doc__', ...}
E         
E         Extra items in the right set:
E         'a.__subclasshook__'
E         'a.__repr__'
E         'a.__len__'
E         'a.__class__'
E         'a.__reduce_ex__'...
E         
E         ...Full output truncated (31 lines hidden), use '-vv' to show

test/test_utils.py:96: AssertionError
=========================== short test summary info ============================
FAILED test/test_utils.py::TestSetupReadline::test_colorama - AssertionError:...
FAILED test/test_utils.py::TestSetupReadline::test_modules - AssertionError: ...
FAILED test/test_utils.py::TestSetupReadline::test_preexisting_values - Asser...
= 3 failed, 3766 passed, 22 skipped, 94 deselected, 1 xfailed in 77.52s (0:01:17) =
@frenzymadness
Copy link
Contributor Author

Forgot to mention that we are preparing pytest 8.2 in Fedora Linux.

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

Successfully merging a pull request may close this issue.

1 participant