Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

improve logging in shortcuts.py and turn to pytest in test_shortcut.py#219

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
even-even wants to merge2 commits intopython-openapi:master
base:master
Choose a base branch
Loading
fromeven-even:improve_shotcuts_and_add_test

Conversation

even-even
Copy link

Hi
I've been using this project for my autotests for a very long time and I want to make a small contribution.

In this CC, the following was done:

  1. improve error message in openapi_schema_validator/shortcuts.py
  2. add more tests and turn from unittest to pytest in tests/unit/test_shortcut.py

Additionally done:

  1. deleted unused libs in some files
  2. corrected a typo in the documentation

I will be glad to receive feedback.

@codecovCodecov
Copy link

codecovbot commentedMar 20, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is50.00000% with3 lines in your changes missing coverage. Please review.

Project coverage is 83.04%. Comparing base(b326d47) to head(bc25733).
Report is 85 commits behind head on master.

Files with missing linesPatch %Lines
openapi_schema_validator/shortcuts.py40.00%2 Missing and 1 partial⚠️
Additional details and impacted files
@@            Coverage Diff             @@##           master     #219      +/-   ##==========================================- Coverage   84.38%   83.04%   -1.35%==========================================  Files           6        6                Lines         237      230       -7       Branches       48       47       -1     ==========================================- Hits          200      191       -9- Misses         24       26       +2  Partials       13       13

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

from typing import Any
from typing import Hashable
from typing import Mapping
from typing import Type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I would keep it as it is here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Returned it back


if errors:
error = best_match(errors)
error.message = f"Validation failed: {error.message}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Would be nice to have it tested

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I studied a little more on my work project.
The solution I proposed adds another line to the log, although it's already clear from the output what's going on.

Returned the logic as it was before my edits.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@p1c2up1c2up1c2u left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@even-even@p1c2u

[8]ページ先頭

©2009-2025 Movatter.jp