pyca/pyopenssl

Some X509 Tests fail on v24.1.0

chereskata opened this issue · 1 comments

Hello,

after trying to upgrade py3-openssl on Alpine Linux to the latest v24.1.0 from v23.3.0 three Tests failed (x86_64, local build).

Here is the log:

____________________________________________________________________________________________ ERROR at setup of TestX509.test_gmtime_adj_notBefore ____________________________________________________________________________________________
[gw1] linux -- Python 3.11.8 /home/user/Documents/aports/community/py3-openssl/src/pyOpenSSL-24.1.0/.testenv/bin/python3                                                                                                                      
                                                                                                                                                                                                                                              
self = <flaky.flaky_pytest_plugin.FlakyPlugin object at 0x7f3ab7688fd0>, item = <Function test_gmtime_adj_notBefore>                                                                                                                          
                                                                                                                                                                                                                                              
    def pytest_runtest_setup(self, item):                                                                                                                                                                                                     
        """                                                                                                                                                                                                                                   
        Pytest hook to modify the test before it's run.                                                                                                                                                                                       
                                                                                                                                                                                                                                              
        :param item:                                                                                                                                                                                                                          
            The test item.                                                                                                                                                                                                                    
        """                                                                                                                                                                                                                                   
        if not self._has_flaky_attributes(item):                                                                                                                                                                                              
            if hasattr(item, 'iter_markers'):
                for marker in item.iter_markers(name='flaky'):
>                   self._make_test_flaky(item, *marker.args, **marker.kwargs)
E                   TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns'

/usr/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError
____________________________________________________________________________________________ ERROR at setup of TestX509.test_gmtime_adj_notAfter _____________________________________________________________________________________________
[gw1] linux -- Python 3.11.8 /home/user/Documents/aports/community/py3-openssl/src/pyOpenSSL-24.1.0/.testenv/bin/python3

self = <flaky.flaky_pytest_plugin.FlakyPlugin object at 0x7f3ab7688fd0>, item = <Function test_gmtime_adj_notAfter>

    def pytest_runtest_setup(self, item):
        """
        Pytest hook to modify the test before it's run.
     
        :param item:
            The test item.
        """
        if not self._has_flaky_attributes(item):
            if hasattr(item, 'iter_markers'):
                for marker in item.iter_markers(name='flaky'):
>                   self._make_test_flaky(item, *marker.args, **marker.kwargs)
E                   TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns'

/usr/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError
_____________________________________________________________________________________ ERROR at setup of TestContext.test_set_cipher_list_no_cipher_match _____________________________________________________________________________________
[gw1] linux -- Python 3.11.8 /home/user/Documents/aports/community/py3-openssl/src/pyOpenSSL-24.1.0/.testenv/bin/python3

self = <flaky.flaky_pytest_plugin.FlakyPlugin object at 0x7f3ab7688fd0>, item = <Function test_set_cipher_list_no_cipher_match>

    def pytest_runtest_setup(self, item):
        """
        Pytest hook to modify the test before it's run.
     
        :param item:
            The test item.
        """
        if not self._has_flaky_attributes(item):
            if hasattr(item, 'iter_markers'):
                for marker in item.iter_markers(name='flaky'):
>                   self._make_test_flaky(item, *marker.args, **marker.kwargs)
E                   TypeError: _FlakyPlugin._make_test_flaky() got an unexpected keyword argument 'reruns'

/usr/lib/python3.11/site-packages/flaky/flaky_pytest_plugin.py:244: TypeError

How to reproduce:

docker run -it --rm alpine:edge /bin/ash

apk add alpine-sdk

git init aports
cd aports
git remote add origin https://gitlab.alpinelinux.org/chereskata/aports.git
echo 'community/py3-openssl/*' > .git/info/sparse-checkout
git config core.sparseCheckout true
git pull origin py3-openssl

cd community/py3-openssl
abuild -r

Would you recommend to disable these tests?

Thank you very much for the invested effort

alex commented

This looks like it's the same as #1298 -- you're using the old flaky which is not compatible with the latest pytest.