Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-1240

TestGridfs::* synchro tests failing on Motor

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers

      https://spruce.mongodb.com/task/motor_main__ssl~nossl_tox_env~synchro_py312_os~rhel84_test_latest_standalone_patch_da50b55d2492aefc50b3425b84174d14709ced1d_65b806210ae6066bbf8d50cc_24_01_29_20_10_16/logs?execution=0&sortBy=STATUS&sortDir=ASC

      motor is failing synchro tests with an AttributeError, it cannot find attribute `_path`.

      Repro steps

      tox -m synchro -- -k TestGridfs

       

       [2024/01/29 15:19:34.187] =================================== FAILURES ===================================
       [2024/01/29 15:19:34.187] ____________________________ TestGridfs.test_abort _____________________________
       [2024/01/29 15:19:34.187] /opt/python/3.12/lib/python3.12/unittest/mock.py:1384: in patched
       [2024/01/29 15:19:34.187]     with self.decoration_helper(patched,
       [2024/01/29 15:19:34.187] /opt/python/3.12/lib/python3.12/contextlib.py:137: in __enter__
       [2024/01/29 15:19:34.187]     return next(self.gen)
       [2024/01/29 15:19:34.187] /opt/python/3.12/lib/python3.12/unittest/mock.py:1366: in decoration_helper
       [2024/01/29 15:19:34.187]     arg = exit_stack.enter_context(patching)
       [2024/01/29 15:19:34.187] /opt/python/3.12/lib/python3.12/contextlib.py:514: in enter_context
       [2024/01/29 15:19:34.187]     result = _enter(cm)
       [2024/01/29 15:19:34.187] /opt/python/3.12/lib/python3.12/unittest/mock.py:1455: in __enter__
       [2024/01/29 15:19:34.187]     original, local = self.get_original()
       [2024/01/29 15:19:34.187] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/01/29 15:19:34.187] self = <unittest.mock._patch object at 0x7f365b27a390>
       [2024/01/29 15:19:34.187]     def get_original(self):
       [2024/01/29 15:19:34.187]         target = self.getter()
       [2024/01/29 15:19:34.187]         name = self.attribute
       [2024/01/29 15:19:34.187]         original = DEFAULT
       [2024/01/29 15:19:34.187]         local = False
       [2024/01/29 15:19:34.187]         try:
       [2024/01/29 15:19:34.187]             original = target.__dict__[name]
       [2024/01/29 15:19:34.187]         except (AttributeError, KeyError):
       [2024/01/29 15:19:34.187]             original = getattr(target, name, DEFAULT)
       [2024/01/29 15:19:34.187]         else:
       [2024/01/29 15:19:34.187]             local = True
       [2024/01/29 15:19:34.187]         if name in _builtins and isinstance(target, ModuleType):
       [2024/01/29 15:19:34.187]             self.create = True
       [2024/01/29 15:19:34.187]         if not self.create and original is DEFAULT:
       [2024/01/29 15:19:34.187]             raise AttributeError(
       [2024/01/29 15:19:34.187] >               "%s does not have the attribute %r" % (target, name)
       [2024/01/29 15:19:34.187]             )
       [2024/01/29 15:19:34.187] E           AttributeError: 'SynchroModuleLoader' object has no attribute '_path' 

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: