Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

testSet assertion on unexpected "No error information" #30

Open
craftyguy opened this issue Nov 13, 2021 · 0 comments
Open

testSet assertion on unexpected "No error information" #30

craftyguy opened this issue Nov 13, 2021 · 0 comments

Comments

@craftyguy
Copy link

This test fails on python 3.10 (not sure if it is specific to python 3.10 or not...)

test/keyutils_test.py .....F...                                                                                                                                                                                  [100%]

======================================================================================================= FAILURES =======================================================================================================
__________________________________________________________________________________________________ BasicTest.testSet ___________________________________________________________________________________________________

self = <test.keyutils_test.BasicTest testMethod=testSet>

    def testSet(self):
        keyDesc = b"test:key:01"
        keyVal = b"key value with\0 some weird chars in it too"
        keyring = keyutils.KEY_SPEC_THREAD_KEYRING

        # Key not initialized; should get None
        keyId = keyutils.request_key(keyDesc, keyring)
        self.assertEqual(keyId, None)

        self.assertRaises(keyutils.Error, keyutils.read_key, 12345)
        try:
>           keyutils.read_key(12345)

test/keyutils_test.py:37:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

keyId = 12345

    def read_key(keyId):
>       return _keyutils.read_key(keyId)

keyutils/__init__.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   PyErr_SetFromErrno(error)
E   keyutils._keyutils.error: (126, 'No error information')

keyutils/_keyutils.pyx:199: error

During handling of the above exception, another exception occurred:

self = <test.keyutils_test.BasicTest testMethod=testSet>

    def testSet(self):
        keyDesc = b"test:key:01"
        keyVal = b"key value with\0 some weird chars in it too"
        keyring = keyutils.KEY_SPEC_THREAD_KEYRING

        # Key not initialized; should get None
        keyId = keyutils.request_key(keyDesc, keyring)
        self.assertEqual(keyId, None)

        self.assertRaises(keyutils.Error, keyutils.read_key, 12345)
        try:
            keyutils.read_key(12345)
        except keyutils.Error as e:
>           self.assertEqual(e.args, (126, 'Required key not available'))
E           AssertionError: Tuples differ: (126, 'No error information') != (126, 'Required key not available')
E
E           First differing element 1:
E           'No error information'
E           'Required key not available'
E
E           - (126, 'No error information')
E           + (126, 'Required key not available')

test/keyutils_test.py:39: AssertionError
=============================================================================================== short test summary info ================================================================================================
FAILED test/keyutils_test.py::BasicTest::testSet - AssertionError: Tuples differ: (126, 'No error information') != (126, 'Required key not available')
============================================================================================= 1 failed, 8 passed in 1.75s ==============================================================================================
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant