multidict icon indicating copy to clipboard operation
multidict copied to clipboard

[WIP] Issue#98: refactor test suite

Open gyermolenko opened this issue 6 years ago • 5 comments

Disclaimer: work in progress. I need initial review to proceed.

Main points:

  • split tests by topics (instantiation, contents, comparisons)
  • create parametrized fixtures - all 4 types of instances ([MultiDict, CIMultiDict, MultiDictProxy, CIMultiDictProxy]) are pre-created and used for tests which concern not instantiation of those classes themselves (unfortunately, pytest so far [doesn't support fixtures in pytest.mark.parametrize] )(https://github.com/pytest-dev/pytest/issues/349)
  • ~~use autouse=True class level hack (since we can't use __init__) to be able to use self.d instead of long fixture names.~~

Since my goal is restructuring - I didn't touch asserts themselves. I think that such comments can be addressed after the fact.

gyermolenko avatar Oct 06 '18 19:10 gyermolenko

Codecov Report

Merging #294 into master will decrease coverage by 0.1%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #294      +/-   ##
==========================================
- Coverage   93.48%   93.37%   -0.11%     
==========================================
  Files          10        5       -5     
  Lines         936      468     -468     
==========================================
- Hits          875      437     -438     
+ Misses         61       31      -30
Impacted Files Coverage Δ
multidict/_multidict_py.py
multidict/__init__.py
multidict/_multidict_base.py
multidict/_compat.py
multidict/_abc.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 30152ca...19f2919. Read the comment docs.

codecov[bot] avatar Oct 06 '18 19:10 codecov[bot]

@asvetlov sorry to bother, just a ping Since this WIP needs your preliminary review before I proceed (or abort) with it.

gyermolenko avatar Oct 11 '18 08:10 gyermolenko

Will do. Sorry for a pause

asvetlov avatar Oct 11 '18 10:10 asvetlov

hey, @asvetlov @webknjaz I've updated this PR and my first comment. Please review and leave your comments :)

gyermolenko avatar Oct 19 '18 21:10 gyermolenko

hey @asvetlov , just a friendly ping. It would be nice to have your comments on updated PR

gyermolenko avatar Nov 09 '18 21:11 gyermolenko

If this is still relevant after #915, please recreate the PR with those fixtures.

webknjaz avatar Jan 14 '24 19:01 webknjaz