Skip to content

Work in progress: harmonize test ids across fixture unionsa and parametrize with fixture refs #155

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

Merged
merged 16 commits into from
Dec 16, 2020

Conversation

smarie
Copy link
Owner

@smarie smarie commented Dec 3, 2020

Fixes #154

Sylvain MARIE added 3 commits December 3, 2020 16:45
 - added an `alternative_index` attribute in `UnionFixtureAlternative` and uniformized the id making process for fixture unions and parametrize alternatives.
 - in particular added an `id` argument to `fixture_ref` and filled this `id` in `@parametrize_with_cases` so that the id is always the one from the case_id
Sylvain MARIE added 5 commits December 9, 2020 09:27
…_case_info`, `set_case_id`, `get_case_id`, `get_case_marks`, `get_case_tags`, `matches_tag_query`, `is_case_class`, `is_case_function`.
…s inside unions either from `fixture_union` or in `@parametrize` with `fixture_ref` (or `@parametrize_with_cases`)

Passing a callable to `idstyle` and `ids` in `@parametrize` and `@parametrize_with_cases` is fully supported, as well as most manners of passing marks, including in pytest 2. `get_marked_parameter_values` now works correctly in pytest 2. `mini_idvalset` now handles lazy_values.
Useless arguments such as `ids` in `_fixture_product` and `idgen` in `@parametrize_with_case` removed.

Generated fixture names through `check_name_available` are now checked and modified so that they are correct identifiers, with a new util method named `make_identifier`

Case functions transformed into a fixture and containing both a parametrization mark and other marks are now correctly supported.

New constant `PYTEST3_OR_GREATER` used everywhere for pytest 2 compat.

`resolve_ids` enhanced

`transform_marks_into_decorators` renamed `markinfos_to_markdecorators`. New functions `markdecorators_as_tuple` and `markdecorators_to_markinfos`
@codecov-io
Copy link

codecov-io commented Dec 13, 2020

Codecov Report

Merging #155 (184b0dd) into master (600b294) will decrease coverage by 0.24%.
The diff coverage is 94.99%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage   91.22%   90.97%   -0.25%     
==========================================
  Files         130      132       +2     
  Lines        5025     5376     +351     
==========================================
+ Hits         4584     4891     +307     
- Misses        441      485      +44     
Impacted Files Coverage Δ
pytest_cases/tests/cases/doc/test_fixtures.py 100.00% <ø> (ø)
...ytest_cases/tests/cases/issues/test_issue_126_2.py 100.00% <ø> (ø)
...st_cases/tests/cases/others/test_glob_low_level.py 94.73% <ø> (ø)
...xture_unions/test_fixture_union_setup_teardown2.py 100.00% <ø> (ø)
pytest_cases/common_others.py 75.42% <71.42%> (-0.87%) ⬇️
pytest_cases/fixture__creation.py 78.18% <75.00%> (-0.55%) ⬇️
pytest_cases/fixture_core1_unions.py 90.85% <88.88%> (+0.65%) ⬆️
pytest_cases/case_funcs_new.py 91.96% <89.47%> (-0.81%) ⬇️
pytest_cases/case_parametrizer_new.py 90.98% <91.66%> (+1.16%) ⬆️
pytest_cases/plugin.py 90.28% <91.66%> (-0.08%) ⬇️
... and 71 more

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 600b294...184b0dd. Read the comment docs.

@smarie smarie merged commit bc81e64 into master Dec 16, 2020
@smarie smarie deleted the fix_issue_154 branch December 16, 2020 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange test name, used idstyle=None
2 participants