Content-Length: 241966 | pFad | https://github.com/joke2k/faker/pull/1711

23 Add support for prefix and suffix to `pystr` provider by stefan6419846 · Pull Request #1711 · joke2k/faker · GitHub
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

Add support for prefix and suffix to pystr provider #1711

Merged
merged 1 commit into from
Aug 31, 2022
Merged

Add support for prefix and suffix to pystr provider #1711

merged 1 commit into from
Aug 31, 2022

Conversation

stefan6419846
Copy link
Contributor

What does this change

Adds support for providing a prefix and a suffix for the pystr provider.

What was wrong

The pystr provider did not allow to use prefixes and suffixes, which is required for migrating from factory_boy.fuzzy.FuzzyText.

How this fixes it

Adds two new parameters for it.

Additionally, the pystr tests have been fixed itself, as they have not been running lately (missing test_ prefix for the method) and the assertion for min_chars == max_chars was broken as well.

Fixes #1707.

Copy link
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@fcurella fcurella merged commit b5fc600 into joke2k:master Aug 31, 2022
@stefan6419846 stefan6419846 deleted the pystr_prefix_suffix branch September 27, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow prefix and suffix values for pystr provider
2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/joke2k/faker/pull/1711

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy