Skip to content

Commit

Permalink
Add new tests for format feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Shivansh-007 committed Jan 23, 2022
1 parent e65f935 commit 5ee6627
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/data/use_braces_in_int_method_calls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
count = 5 .bit_count()
abs = 10 .__abs__()
is_integer = 10.5 .is_integer()

if 10 .real: ...

for number in range(1, 10):
if number.imag: ...


# output
count = (5).bit_count()
abs = (10).__abs__()
is_integer = (10.5).is_integer()

if (10).real:
...

for number in range(1, 10):
if number.imag:
...



1 change: 1 addition & 0 deletions tests/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"string_prefixes",
"tricky_unicode_symbols",
"tupleassign",
"use_braces_in_int_method_calls",
]

PY310_CASES: List[str] = [
Expand Down

0 comments on commit 5ee6627

Please sign in to comment.