Skip to content

Commit

Permalink
Simplify pandas LHS masked dataframe test
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephSBoyle committed Jan 2, 2024
1 parent 5f66543 commit 8c9e509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test_joy.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,16 +618,16 @@ def test_format_on_last_line():
def test_multi_line_dataframe_code():
static_code =\
"""
division = df[df["class"] == 1]["weight"].sum() / \
df[df["class"] == 0]["weight"].sum()
df[df["class"] == 0]["weight"] *= division
df = pd.load_df("...")
df[df["class"] == 0]["weight"] = 0
"""
assert align_assignment_expressions(static_code) == static_code

def test_semicolon_not_type_hint_expression():
static_code =\
"""
logging.info("content count: gifs: %s, imgs: %s", len(gifs), len(imgs))'
logging.info("content count: gifs: %s, imgs: %s", len(gifs), len(imgs))
logging.info('content count: gifs: %s, imgs: %s', len(gifs), len(imgs))
"""
assert align_assignment_expressions(static_code) == static_code

Expand Down

0 comments on commit 8c9e509

Please sign in to comment.