-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
[TODO] Migrate tests/gen_pickles.py
into a pytest fixture
#922
Comments
I've raised a PR here (#924). I think this addresses the ideas mentioned here. let me know if there's a better way to do this or if I'm barking up the wrong tree completely! |
I'll have a number of comments in the review there. |
Sounds good. Let me know! |
I tried to fix #924 locally and after a few iterations of a simplification I realized that the def test_pickle(any_multidict_class, pickle_protocol):
d = any_multidict_class([("a", 1), ("a", 2)])
pbytes = pickle.dumps(d, pickle_protocol)
obj = pickle.loads(pbytes)
assert d == obj
assert isinstance(obj, any_multidict_class) @webknjaz what do you think? @vrdn-23, in case @webknjaz decide to keep this test, it would be better to use |
Feel free to submit an alternative PR. |
The idea is simple:
tests/conftest.py
gen_pickles.py
there and generate the pickles in atmppath
-provided dirtests/gen_pickles.py
and the pickle files in thetests/
dirThe text was updated successfully, but these errors were encountered: