Skip to content

Commit

Permalink
remove formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vikasgrewal16 committed Nov 1, 2024
1 parent d833be8 commit f30916a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/transpilers/test_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,17 +381,18 @@ def test_transpiler_typecastexpr() -> None:
target_type = astx.Int32()
# Create the TypeCastExpr
cast_expr = astx.TypeCastExpr(expr=expr, target_type=target_type)

# Initialize the generator
generator = astx2py.ASTxPythonTranspiler()

generated_code = generator.visit(cast_expr)
expected_code = "cast(int, x)"

assert (
generated_code == expected_code
), f"Expected '{expected_code}', but got '{generated_code}'"


def test_transpiler_utf8_char() -> None:
"""Test astx.Utf8Char."""
# Create a Utf8Char node
Expand Down

0 comments on commit f30916a

Please sign in to comment.