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 Windows failed Jun 13, 2025 in 1m 4s

Task Summary

Instruction qa failed in 00:08

Details

βœ… 00:05 prepare_disk
βœ… 00:04 clone
βœ… 00:03 jfrog_win_install
βœ… 00:15 poetry_win_install
βœ… 00:18 jfrog_config
❌ 00:08 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=WindowsPath('~/.sonar/cache/jre.tgz'), checksum='abd5d018cd45f55b80df3321284c613df7d2eb1d11318b761bae280c3c686fa2')
mode = 'wb'

    def open(self, mode: OpenBinaryMode) -> typing.BinaryIO:
>       return open(self.filepath, mode=mode)
E       FileNotFoundError: [Errno 2] No such file or directory: '~\\.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
  C:\Python312\Lib\argparse.py:1472: 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='abd5d018cd45f55b80df3321284c613df7d2eb1d11318b761bae280c3c686fa2', java_path='java', os='linux', arch='aarch64', download_url=None), 'bytes': b'\x1f\x8b\x08\x00\xe5\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': 'abd5d018cd45f55b80df3321284c613df7d2eb1d11318b761bae280c3c686fa2', '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='abd5d018cd45f55b80df3321284c613df7d2eb1d11318b761bae280c3c686fa2', java_path='java', os='linux', arch='aarch64', download_url=None), 'bytes': b'\x1f\x8b\x08\x00\xe5\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': 'abd5d018cd45f55b80df3321284c613df7d2eb1d11318b761bae280c3c686fa2', '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 5.72s =