Skip to content

Commit

Permalink
STY: Use casefold() instead of lower()
Browse files Browse the repository at this point in the history
Reorder test so asserts are together.
  • Loading branch information
j-t-1 authored Jan 6, 2025
1 parent d135fd2 commit 0f55bca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ def test_slash_prefix():
if isinstance(constant_value, Callable):
continue

assert constant_value.startswith("/")
assert attr.replace("_", "").casefold() == constant_value[1:].casefold()

# There are a few exceptions that may be lowercase
if cls == GraphicsStateParameters and attr in ["ca", "op"]:
continue

assert constant_value.startswith("/")
assert pattern.match(constant_value)
assert attr.replace("_", "").casefold() == constant_value[1:].casefold()


def test_user_access_permissions__dict_handling():
Expand Down

0 comments on commit 0f55bca

Please sign in to comment.