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

Add tests for pickling and copying PyStructSequence objects #110267

Closed
serhiy-storchaka opened this issue Oct 3, 2023 · 0 comments · Fixed by #110272
Closed

Add tests for pickling and copying PyStructSequence objects #110267

serhiy-storchaka opened this issue Oct 3, 2023 · 0 comments · Fixed by #110272
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 new features, bugs and security fixes easy tests Tests in the Lib/test dir

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Oct 3, 2023

PyStructSequence supports pickling and copying, but there are no tests for this. There is only one trivial test which tests that __reduce__() does not raise exception or crash.

Needed explicit tests for copy.copy(), copy.deepcopy() (it is the same, but still), pickle.dumps()/pickle.loads().

cc @XuehaiPan

Linked PRs

@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir 3.11 only security fixes easy 3.12 bugs and security fixes 3.13 new features, bugs and security fixes labels Oct 3, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 3, 2023
…objects (pythonGH-110272)

(cherry picked from commit 2d4865d)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 3, 2023
…objects (pythonGH-110272)

(cherry picked from commit 2d4865d)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
serhiy-storchaka pushed a commit that referenced this issue Oct 4, 2023
… objects (GH-110272) (GH-110285)

(cherry picked from commit 2d4865d)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
serhiy-storchaka pushed a commit that referenced this issue Oct 4, 2023
… objects (GH-110272) (GH-110284)

(cherry picked from commit 2d4865d)

Co-authored-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11 only security fixes 3.12 bugs and security fixes 3.13 new features, bugs and security fixes easy tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant