pytest-dev / pytest-mimesis

Mimesis integration with the pytest test runner. This plugin provider useful fixtures based on providers from Mimesis.
https://pypi.org/project/pytest-mimesis/
MIT License
62 stars 4 forks source link

Write all tests and update readme #1

Closed lk-geimfari closed 7 years ago

lk-geimfari commented 7 years ago

We need to write test for all providers and update README.md

lk-geimfari commented 7 years ago

@wikkiewikkie Are you interested?

wikkiewikkie commented 7 years ago

@lk-geimfari Is the idea here that someone can use Elizabeth as part of the test suite for their project?

For example, they have a function that should check that the user input a valid e-mail address. In the test for that function, they could use Elizabeth to generate fake e-mail addresses as input?

wikkiewikkie commented 7 years ago
from pytest-elizabeth import personal
from myproject import validate_email

def test_validate_email(personal):
    result = validate_email(personal.email())
    assert result

Something like that?

lk-geimfari commented 7 years ago

@wikkiewikkie Yeah. For case like in example above and for another cases. It's a plugin and we should not import nothing

def test_generic(personal, elizabeth_locale):
"""Test elizabeth fixture."""
    assert isinstance(generic, elizabeth.Personal)
    assert personal.name()
    assert elizabeth_locale == 'en'

We use fixtures.

lk-geimfari commented 7 years ago

@wikkiewikkie Now you're collaborator and we can work on it together. You can merge PRs without me.

lk-geimfari commented 7 years ago

@wikkiewikkie Also, if you interested in testing tools i have an experimental project that provider regex patterns. Here you can look at details

lk-geimfari commented 7 years ago

We also can do from expynent something useful.

wikkiewikkie commented 7 years ago

@lk-geimfari I will check out expynent

lk-geimfari commented 7 years ago

@wikkiewikkie Okay. Thanks!