Skip to content

Commit 0d65ccf

Browse files
committed
tests: fix compatibility with Python 3.12's unittest.mock
`called_with` was likely not the right call to make, since this would return a mock instance. Instead, use `assert_called_with`. See: python/cpython#100690
1 parent 6cc908f commit 0d65ccf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_checksum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test__posix_fadvise_sequential(
4949
# Make mypy happy
5050
assert hasattr(os, "POSIX_FADV_SEQUENTIAL")
5151

52-
assert mocked.called_with(
52+
mocked.assert_called_with(
5353
fd.fileno(),
5454
0,
5555
os.fstat(fd.fileno()).st_size,

0 commit comments

Comments
 (0)