Skip to content

Update dependency pytest-subtests to v0.14.2

6562235
Select commit
Loading
Failed to load commit list.
Closed

Update dependency pytest-subtests to v0.14.2 - autoclosed #220

Update dependency pytest-subtests to v0.14.2
6562235
Select commit
Loading
Failed to load commit list.
Cirrus CI / Test Python 3.13 failed Jun 13, 2025 in 20s

Task Summary

Instruction qa failed in 00:01

Details

✅ 00:00 clone
✅ 00:03 poetry
✅ 00:01 poetry_install
✅ 00:04 jfrog_config
❌ 00:01 qa

            jre: JRE
            bytes: bytes
            checksum: str
            unzip_dir: str
    
        jres_to_test: list[JRETestCase] = [
            {"jre": self.zip_jre, "bytes": self.zip_bytes, "checksum": self.zip_checksum, "unzip_dir": "jre.zip_unzip"},
            {
                "jre": self.tar_gz_jre,
                "bytes": self.tar_gz_bytes,
                "checksum": self.tar_gz_checksum,
                "unzip_dir": "jre17.0.13.tar.gz_unzip",
            },
            {"jre": self.tgz_jre, "bytes": self.tgz_bytes, "checksum": self.tgz_checksum, "unzip_dir": "jre.tgz_unzip"},
        ]
        for testcase in jres_to_test:
            testcase_jre = testcase["jre"]
            jres = [testcase_jre, self.other_jre]
            with self.subTest(jre=testcase), sq_api_utils.sq_api_mocker() as mocker:
                mocker.mock_analysis_jres(body=[sq_api_utils.jre_to_dict(jre) for jre in jres])
                mocker.mock_analysis_jre_download(id=testcase_jre.id, body=testcase["bytes"], status=200)
    
                provisioner = JREProvisioner(self.api, self.cache, utils.get_os().value, utils.get_arch().value)
>               jre_path = provisioner.provision()

tests/unit/test_jre.py:161: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
src/pysonar_scanner/jre.py:67: in provision
    jre, resolved_path = self.__attempt_provisioning_jre_with_retry()
src/pysonar_scanner/jre.py:71: in __attempt_provisioning_jre_with_retry
    jre_and_resolved_path = self.__attempt_provisioning_jre()
src/pysonar_scanner/jre.py:87: in __attempt_provisioning_jre
    jre_path = self.__download_jre(jre)
src/pysonar_scanner/jre.py:106: in __download_jre
    with cache_file.open(mode="wb") as f:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = CacheFile(filepath=PosixPath('/usr/sbin/.sonar/cache/jre.tgz'), checksum='fbaa3b76fc290128e7d2e5c46b1a7d0a9789f5acce7b96b544dd1dab79ae430e')
mode = 'wb'

    def open(self, mode: OpenBinaryMode) -> typing.BinaryIO:
>       return open(self.filepath, mode=mode)
E       FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/.sonar/cache/jre.tgz'

src/pysonar_scanner/cache.py:49: FileNotFoundError
=============================== warnings summary ===============================
tests/unit/test_configuration_cli.py: 95 warnings
tests/unit/test_configuration_loader.py: 50 warnings
  /home/sonarsource/.local/share/uv/python/cpython-3.13.2-linux-x86_64-gnu/lib/python3.13/argparse.py:1465: DeprecationWarning: 'type' is deprecated as of Python 3.12 and will be removed in Python 3.14.
    action = action_class(**kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
(jre={'jre': JRE(id='tar_gz_jre', filename='jre17.0.13.tar.gz', sha256='fbaa3b76fc290128e7d2e5c46b1a7d0a9789f5acce7b96b544dd1dab79ae430e', java_path='java', os='linux', arch='aarch64', download_url=None), 'bytes': b'\x1f\x8b\x08\x00\x97\x18Lh\x02\xff\xed\xcdA\n\xc20\x14\x04\xd0\x7f\x94\x9e@R\xac\xf5<\x85\x04\\\xa4\x14\xa2\xe2\xf5\r\xdd\x08\xee\x15\xc4\xf763\xccfZY\xf2Z\x0ek\x8e\xcfI\xdd<M{v\xef\x99\xd2x|\xf5}?\x9f\xc69\x86\x14_p\xbf\xde\x96\xd6/\xe3?]J\xad\xdb\xf0\xd8Z\xcd\x01\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xefx\x02\xccq\x9cS\x00(\x00\x00', 'checksum': 'fbaa3b76fc290128e7d2e5c46b1a7d0a9789f5acce7b96b544dd1dab79ae430e', 'unzip_dir': 'jre17.0.13.tar.gz_unzip'}) SUBFAIL tests/unit/test_jre.py::TestJREProvisioner::test_successfully_downloading_jre
(jre={'jre': JRE(id='tgz_jre', filename='jre.tgz', sha256='fbaa3b76fc290128e7d2e5c46b1a7d0a9789f5acce7b96b544dd1dab79ae430e', java_path='java', os='linux', arch='aarch64', download_url=None), 'bytes': b'\x1f\x8b\x08\x00\x97\x18Lh\x02\xff\xed\xcdA\n\xc20\x14\x04\xd0\x7f\x94\x9e@R\xac\xf5<\x85\x04\\\xa4\x14\xa2\xe2\xf5\r\xdd\x08\xee\x15\xc4\xf763\xccfZY\xf2Z\x0ek\x8e\xcfI\xdd<M{v\xef\x99\xd2x|\xf5}?\x9f\xc69\x86\x14_p\xbf\xde\x96\xd6/\xe3?]J\xad\xdb\xf0\xd8Z\xcd\x01\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xefx\x02\xccq\x9cS\x00(\x00\x00', 'checksum': 'fbaa3b76fc290128e7d2e5c46b1a7d0a9789f5acce7b96b544dd1dab79ae430e', 'unzip_dir': 'jre.tgz_unzip'}) SUBFAIL tests/unit/test_jre.py::TestJREProvisioner::test_successfully_downloading_jre
= 2 failed, 122 passed, 3 deselected, 145 warnings, 67 subtests passed in 0.66s =