Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccountServiceTest.test_storage fails on 3.12 #446

Open
mweinelt opened this issue Feb 19, 2024 · 0 comments
Open

AccountServiceTest.test_storage fails on 3.12 #446

mweinelt opened this issue Feb 19, 2024 · 0 comments

Comments

@mweinelt
Copy link

The problem

The test AccountServiceTest.test_storage started failing on Python 3.12. It works on 3.11.

Environment

  • pyiCloud release with the issue (pip show pyicloud): 1.0.0
  • Last working pyiCloud release (if known): none
  • Service causing this issue: n/a
  • Python version (python -V): 3.12.2
  • Operating environment (project deps/Docker/Windows/etc.): Linux

Traceback/Error logs

============================= test session starts ==============================
platform linux -- Python 3.12.2, pytest-7.4.4, pluggy-1.4.0 -- /nix/store/n3jf1lkdfakxskzsm4nlhss8mdgmcqhc-python3-3.12.2/bin/python3.12
cachedir: .pytest_cache
rootdir: /build/source
configfile: setup.cfg
testpaths: tests
plugins: mock-3.12.0
collected 20 items                                                             

tests/test_account.py::AccountServiceTest::test_devices PASSED           [  5%]
tests/test_account.py::AccountServiceTest::test_family PASSED            [ 10%]
tests/test_account.py::AccountServiceTest::test_repr PASSED              [ 15%]
tests/test_account.py::AccountServiceTest::test_storage FAILED           [ 20%]
tests/test_account.py::AccountServiceTest::test_storage_usage PASSED     [ 25%]
tests/test_account.py::AccountServiceTest::test_storage_usages_by_media PASSED [ 30%]
tests/test_cmdline.py::TestCmdline::test_device_outputfile PASSED        [ 35%]
tests/test_cmdline.py::TestCmdline::test_help PASSED                     [ 40%]
tests/test_cmdline.py::TestCmdline::test_no_arg PASSED                   [ 45%]
tests/test_cmdline.py::TestCmdline::test_username PASSED                 [ 50%]
tests/test_cmdline.py::TestCmdline::test_username_password_invalid PASSED [ 55%]
tests/test_cmdline.py::TestCmdline::test_username_password_requires_2fa PASSED [ 60%]
tests/test_drive.py::DriveServiceTest::test_file_open PASSED             [ 65%]
tests/test_drive.py::DriveServiceTest::test_folder PASSED                [ 70%]
tests/test_drive.py::DriveServiceTest::test_folder_app PASSED            [ 75%]
tests/test_drive.py::DriveServiceTest::test_folder_not_exists PASSED     [ 80%]
tests/test_drive.py::DriveServiceTest::test_root PASSED                  [ 85%]
tests/test_drive.py::DriveServiceTest::test_subfolder PASSED             [ 90%]
tests/test_drive.py::DriveServiceTest::test_subfolder_file PASSED        [ 95%]
tests/test_findmyiphone.py::FindMyiPhoneServiceTest::test_devices PASSED [100%]

=================================== FAILURES ===================================
_______________________ AccountServiceTest.test_storage ________________________

self = <tests.test_account.AccountServiceTest testMethod=test_storage>

    def test_storage(self):
        """Tests storage."""
        assert self.service.storage
        # fmt: off
>       assert repr(self.service.storage) == "<AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by_media: OrderedDict([('photos', <AccountStorageUsageForMedia: {key: photos, usage: 0 bytes}>), ('backup', <AccountStorageUsageForMedia: {key: backup, usage: 799008186 bytes}>), ('docs', <AccountStorageUsageForMedia: {key: docs, usage: 449092146 bytes}>), ('mail', <AccountStorageUsageForMedia: {key: mail, usage: 1101522944 bytes}>)])}>"
E       assert "<AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by_media: OrderedDict({'photos': <AccountStorageUsageForMedia: {key: photos, usage: 0 bytes}>, 'backup': <AccountStorageUsageForMedia: {key: backup, usage: 799008186 bytes}>, 'docs': <AccountStorageUsageForMedia: {key: docs, usage: 449092146 bytes}>, 'mail': <AccountStorageUsageForMedia: {key: mail, usage: 1101522944 bytes}>})}>" == "<AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by_media: OrderedDict([('photos', <AccountStorageUsageForMedia: {key: photos, usage: 0 bytes}>), ('backup', <AccountStorageUsageForMedia: {key: backup, usage: 799008186 bytes}>), ('docs', <AccountStorageUsageForMedia: {key: docs, usage: 449092146 bytes}>), ('mail', <AccountStorageUsageForMedia: {key: mail, usage: 1101522944 bytes}>)])}>"
E         - <AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by_media: OrderedDict([('photos', <AccountStorageUsageForMedia: {key: photos, usage: 0 bytes}>), ('backup', <AccountStorageUsageForMedia: {key: backup, usage: 799008186 bytes}>), ('docs', <AccountStorageUsageForMedia: {key: docs, usage: 449092146 bytes}>), ('mail', <AccountStorageUsageForMedia: {key: mail, usage: 1101522944 bytes}>)])}>
E         ?                                                                                        ^^        ^                                                             ^^^^        ^                                                                     ^^^^^^^^^^^                                                                   ^^^^      ^                                                                     ^^^^
E         + <AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by_media: OrderedDict({'photos': <AccountStorageUsageForMedia: {key: photos, usage: 0 bytes}>, 'backup': <AccountStorageUsageForMedia: {key: backup, usage: 799008186 bytes}>, 'docs': <AccountStorageUsageForMedia: {key: docs, usage: 449092146 bytes}>, 'mail': <AccountStorageUsageForMedia: {key: mail, usage: 1101522944 bytes}>})}>
E         ?                                                                                        ^        ^                                                             ^^        ^                                                                     ^^^^^^^^^                                                                   ^^      ^                                                                    + ^^

tests/test_account.py:73: AssertionError
=========================== short test summary info ============================
FAILED tests/test_account.py::AccountServiceTest::test_storage - assert "<AccountStorage: {usage: 43.75% used of 5368709120 bytes, usages_by...
========================= 1 failed, 19 passed in 0.70s =========================

Additional information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant