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

[Integration] Pytest plugin is outdated #1473

Closed
Dragon1573 opened this issue Jan 25, 2024 · 4 comments
Closed

[Integration] Pytest plugin is outdated #1473

Dragon1573 opened this issue Jan 25, 2024 · 4 comments
Assignees
Labels
enhancement Enhancement proposals

Comments

@Dragon1573
Copy link

Feature request

Bundle pytest fixtures support in mimesis itself, without any other "wrapper" packages (such as pytest-mimesis)

Thesis

I'm switching from Faker to mimesis these days, as package Faker does not able to provide auto-completions when using VSCode Pylance. When I try to integrate mimesis with pytest, I find a "wrapper" package called pytest-mimesis in your documentation.

Install pytest-mimesis and mimesis itself with pdm, depencency tree shows as follows.

D:\Workloads\Playground> python --version
Python 3.12.1

D:\Workloads\Playground> pipx --version
1.4.3

D:\Workloads\Playground> pdm --version
PDM, version 2.12.2

D:\Workloads\Playground> pdm add -G check pytest-mimesis
Adding packages to check dependencies: pytest-mimesis
🔒 Lock successful
Changes are written to pyproject.toml.
Synchronizing working set with resolved packages: 2 to add, 0 to update, 0 to remove

  ✔ Install pytest-mimesis 1.1.0 successful
  ✔ Install mimesis 4.1.3 successful

🎉 All complete!

D:\Workloads\Playground> pdm list --tree '*mimesis*'
pytest-mimesis 1.1.0 [ required: >=1.1.0 ]
├── mimesis 4.1.3 [ required: <5.0,>=4.0 ]
└── pytest 7.4.4 [ required: >=4.2 ]
    ├── colorama 0.4.6 [ required: Any ]
    ├── iniconfig 2.0.0 [ required: Any ]
    ├── packaging 23.2 [ required: Any ]
    └── pluggy 1.3.0 [ required: <2.0,>=0.12 ]

Reasoning

Package mimesis is limited to >=4.0,<5.0 because of pytest-mimesis version >=1.1.0, while the latest version of pytest-mimesis is exactly 1.1.0, released 4 years ago. The latest version of mimesis itself is 13.1.0 released no more than 24 hours ago.

Inspecting the official repository of pytest-mimesis, the package only supports Python >=3.6,<=3.8. The package has been staled for a long time and NO more commits since 2020-03-21.

If mimesis itself can provide direct support of pytest, and disconnect from pytest-mimesis, it would be great as mimesis is currently active developing.

@lk-geimfari
Copy link
Owner

I'll work on the new version of pytest-mimesis this weekend.

@lk-geimfari lk-geimfari self-assigned this Jan 25, 2024
@lk-geimfari lk-geimfari added the enhancement Enhancement proposals label Jan 25, 2024
@lk-geimfari
Copy link
Owner

Pytest plugin will be a part of Mimesis starting from the version 14.0.0. It's already in the master branch and I'm going to update docs and the repository of the pytest-mimesis approprietly.

@lk-geimfari
Copy link
Owner

The last thing to be done is to support not only field, but fieldset too.

@lk-geimfari
Copy link
Owner

Mimesis 14.0.0 is released. I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement proposals
Projects
None yet
Development

No branches or pull requests

2 participants