镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

test_seek_end and test_seek_current fails due to regression in Python 3.12.0a1+. #569

Description

@hrnciar

While building pyfilesystem2 with development versions of Python 3.12 I discovered a regression in CPython. You can find details and reproducer here.

=================================== FAILURES ===================================
________________________ TestReadZipFSMem.test_seek_end ________________________

self = <tests.test_zipfs.TestReadZipFSMem testMethod=test_seek_end>

def test_seek_end(self):
    with self.fs.openbin("top.txt") as f:
        self.assertEqual(f.tell(), 0)
        self.assertEqual(f.seek(-12, Seek.end), 0)
        self.assertEqual(f.read1(5), b"Hello")
        self.assertEqual(f.seek(-7, Seek.end), 5)
        self.assertEqual(f.seek(-5, Seek.end), 7)
      self.assertEqual(f.read(), b"World")

E AssertionError: b'' != b'World'

tests/test_zipfs.py:170: AssertionError
______________________ TestReadZipFSMem.test_seek_current ______________________

self = <tests.test_zipfs.TestReadZipFSMem testMethod=test_seek_current>

def test_seek_current(self):
    with self.fs.openbin("top.txt") as f:
        self.assertEqual(f.tell(), 0)
        self.assertEqual(f.read(5), b"Hello")
        self.assertEqual(f.tell(), 5)
        self.assertEqual(f.seek(2, Seek.current), 7)
      self.assertEqual(f.read1(), b"World")

E AssertionError: b'' != b'World'

tests/test_zipfs.py:156: AssertionError

FAILED tests/test_zipfs.py::TestReadZipFSMem::test_seek_end - AssertionError:...
FAILED tests/test_zipfs.py::TestReadZipFSMem::test_seek_current - AssertionEr...

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions