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

Module already imported so cannot be rewritten: tavern #160

Closed
zurek11 opened this issue Jul 26, 2018 · 4 comments
Closed

Module already imported so cannot be rewritten: tavern #160

zurek11 opened this issue Jul 26, 2018 · 4 comments

Comments

@zurek11
Copy link

zurek11 commented Jul 26, 2018

Hello. i have this warning at the end of test. Where can be problem? Or is there some way to ignore warnings at least? Thank you.

@benhowes
Copy link
Member

@zurek11 can't help you without more context than that? Can you provide details of how you're running your tests and perhaps a test file if it's specific to that?

@zurek11
Copy link
Author

zurek11 commented Jul 26, 2018

tests are running by tavern run() function like that: success = run("test_bowa.tavern.yaml", variables)

in test_bowa.tavern.yaml i have some get functions and all are passed:

`============================= test session starts =============================
platform win32 -- Python 3.6.5, pytest-3.6.3, py-1.5.4, pluggy-0.6.0
rootdir: C:\Users\zurek, inifile:
plugins: tavern-0.14.4
collected 16 items / 8 deselected

test_varos.tavern.yaml ........                                          [100%]

============================== warnings summary ===============================
<undetermined location>
  Module already imported so cannot be rewritten: tavern

-- Docs: http://doc.pytest.org/en/latest/warnings.html
============= 8 passed, 8 deselected, 1 warnings in 26.12 seconds =============
2018-07-26 16:00:13,571 - root - ERROR - Error running tests.

Process finished with exit code 0`

Maybe its because i have 2 .yaml files in my test folder:

test_varos.tavern.yaml
test_bowa.tavern.yaml

@michaelboulton
Copy link
Member

It's some kind of warning from Pytest because you're importing tavern then it's being run from inside Pytest as a plugin. It happens with pytest-cov as well (see pytest-dev/pytest-cov#148). It can be safely ignored, I'm not sure how to suppress it though

@zurek11
Copy link
Author

zurek11 commented Jul 26, 2018

I saw that it can be changed in pytest.ini but idk where is this folder.

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

3 participants