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

How to get PyCharm test run working with pytest-dotenv? #10

Closed
namgivu opened this issue Nov 6, 2019 · 3 comments
Closed

How to get PyCharm test run working with pytest-dotenv? #10

namgivu opened this issue Nov 6, 2019 · 3 comments

Comments

@namgivu
Copy link

namgivu commented Nov 6, 2019

I succeeded with running my test with pytest-dotenv from command line as below quote

============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: /my/local/path/to/pytest-start, inifile: pytest.ini
plugins: forked-1.1.3, dotenv-0.4.0, xdist-1.30.0
collected 1 item

tests/test_dotenv.py .

============================== 1 passed in 0.01s ===============================

Though when running the test with PyCharm test run mode, the plugin not working.
So my question is how to get PyCharm test run working with pytest-dotenv?

@quiqua
Copy link
Owner

quiqua commented Nov 6, 2019

I've never tried to use PyCharm and don't know how it will interact with pytest and its plugins in general.

Do you have a sample project I could look into?

@namgivu
Copy link
Author

namgivu commented Nov 7, 2019

Do you have a sample project I could look into?

Yeah sure, here it is https://github.com/namgivu/pytest-start - we can just git clone then open this repo with PyCharm edition Community

@quiqua
Copy link
Owner

quiqua commented Nov 7, 2019

Please have a look at the PR I opened at your repo. The noteworthy change is using the virtualenv you installed pytest and pytest-dotenv to.

@quiqua quiqua closed this as completed Nov 7, 2019
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

No branches or pull requests

2 participants