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 normalized case for file path comparison #9737

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from enum import Enum
from functools import partial, partialmethod
from itertools import product
from os.path import normcase
from typing import Any, Callable, Deque, Dict, FrozenSet, List, NamedTuple, Optional, Tuple, Union
from unittest.mock import MagicMock

Expand Down Expand Up @@ -1960,7 +1961,7 @@ def check_x(cls, x: int, values: Dict[str, Any]) -> int:
# check that we got stacklevel correct
# if this fails you need to edit the stacklevel
# parameter to warnings.warn in _decorators.py
assert w.filename == __file__
assert normcase(w.filename) == normcase(__file__)
source = _get_source_line(w.filename, w.lineno)
assert "@validator('x')" in source

Expand Down