Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure valid class name in locustfile when filename contains special characters #15

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

ivanpuchalka
Copy link
Contributor

@ivanpuchalka ivanpuchalka commented Apr 15, 2024

Not as trivial as I thought it'd be. Taking the definition in https://docs.python.org/3.8/reference/lexical_analysis.html#identifiers, the new code replaces any invalid character with an underscore.

Only added a simple test to the same file as the rest, I can add more if needed.

Fixes #14

@cyberw
Copy link
Collaborator

cyberw commented Apr 15, 2024

Nice!

@cyberw cyberw merged commit 0c847e6 into SvenskaSpel:main Apr 15, 2024
5 checks passed
@cyberw cyberw changed the title Add valid class name generation Ensure valid class name in locustfile when filename contains special characters Apr 15, 2024
@ivanpuchalka ivanpuchalka deleted the class-name-generation branch May 5, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invlid generated class name
2 participants