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

Use pytest-kwparametrize #141

Merged
merged 2 commits into from
Jul 13, 2021
Merged

Use pytest-kwparametrize #141

merged 2 commits into from
Jul 13, 2021

Conversation

akaihola
Copy link
Owner

@akaihola akaihola commented May 22, 2021

Build failure on Windows is due to #133. Rebase this after merging #142.

@akaihola akaihola added the CI label May 22, 2021
@akaihola akaihola added this to the 1.3.0 milestone May 22, 2021
@akaihola akaihola self-assigned this May 22, 2021
@akaihola akaihola force-pushed the pytest-kwparametrize branch 2 times, most recently from 6dcb348 to cac97d1 Compare June 28, 2021 19:52
@akaihola akaihola requested review from samoylovfp and sherbie June 28, 2021 19:53
akaihola added 2 commits July 12, 2021 22:58
It replaces `@pytest.mark.parametrize`. Installed from the
`pytest-kwparametrize` package. Use it when there are more
than two parametrization arguments.
@akaihola akaihola force-pushed the pytest-kwparametrize branch from cac97d1 to 8366d37 Compare July 12, 2021 19:58
@sourcery-ai
Copy link

sourcery-ai bot commented Jul 12, 2021

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 2.56%.

Quality metrics Before After Change
Complexity 0.42 ⭐ 0.42 ⭐ 0.00
Method Length 83.78 🙂 94.96 🙂 11.18 👎
Working memory 6.28 🙂 6.97 🙂 0.69 👎
Quality 78.06% 75.50% -2.56% 👎
Other metrics Before After Change
Lines 2562 2671 109
Changed files Quality Before Quality After Quality Change
src/darker/tests/test_argparse_helpers.py 80.81% ⭐ 75.97% ⭐ -4.84% 👎
src/darker/tests/test_black_diff.py 80.00% ⭐ 76.84% ⭐ -3.16% 👎
src/darker/tests/test_chooser.py 83.50% ⭐ 82.91% ⭐ -0.59% 👎
src/darker/tests/test_command_line.py 72.62% 🙂 69.59% 🙂 -3.03% 👎
src/darker/tests/test_config.py 73.14% 🙂 65.90% 🙂 -7.24% 👎
src/darker/tests/test_diff.py 85.97% ⭐ 85.75% ⭐ -0.22% 👎
src/darker/tests/test_git.py 78.48% ⭐ 76.21% ⭐ -2.27% 👎
src/darker/tests/test_import_sorting.py 86.36% ⭐ 83.69% ⭐ -2.67% 👎
src/darker/tests/test_linting.py 75.08% ⭐ 72.20% 🙂 -2.88% 👎
src/darker/tests/test_main.py 73.03% 🙂 71.70% 🙂 -1.33% 👎
src/darker/tests/test_main_revision.py 57.09% 🙂 52.56% 🙂 -4.53% 👎
src/darker/tests/test_utils.py 86.68% ⭐ 84.13% ⭐ -2.55% 👎
src/darker/tests/test_verification.py 87.42% ⭐ 88.12% ⭐ 0.70% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
src/darker/tests/test_main.py test_main 0 ⭐ 263 ⛔ 17 ⛔ 44.67% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_command_line.py test_parse_command_line 4 ⭐ 631 ⛔ 9 🙂 47.94% 😞 Try splitting into smaller methods
src/darker/tests/test_config.py test_load_config 0 ⭐ 299 ⛔ 12 😞 49.61% 😞 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_main_revision.py test_revision 1 ⭐ 290 ⛔ 10 😞 52.56% 🙂 Try splitting into smaller methods. Extract out complex expressions
src/darker/tests/test_main.py test_format_edited_parts 0 ⭐ 160 😞 14 😞 55.28% 🙂 Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@akaihola akaihola merged commit 7e07535 into master Jul 13, 2021
@akaihola akaihola deleted the pytest-kwparametrize branch July 13, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

3 participants