Created
January 29, 2023 13:04
-
-
Save lambdaofgod/7c9738c483d9265232fca4dbab2978d4 to your computer and use it in GitHub Desktop.
Test Rust tokenization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rust_functions import tokenize_python_code | |
def test_simple_input(): | |
example_code = """ | |
def foo(): | |
return x + 1 | |
""" | |
expected_tokens = ["def", "foo", "(", ")", "return", "x", "+", "1"] | |
assert tokenize_rust(example_code.strip()) == expected_tokens |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment