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

Failed to run tests with flask templates on Windows and Mac #7

Open
v-jiaodi opened this issue Oct 16, 2023 · 11 comments
Open

Failed to run tests with flask templates on Windows and Mac #7

v-jiaodi opened this issue Oct 16, 2023 · 11 comments
Assignees

Comments

@v-jiaodi
Copy link
Member

Describe the issue:
When test Running tests with flask templates on Windows and Mac, run python3 -m pytest, get error as follow:
image

Repro Steps:

  1. Clone the repo to local.
  2. Create a Python virtual environment and activate it.
  3. Install requirements:
    python3 -m pip install -r requirements-dev.in
    playwright install --with-deps
  4. Run the tests: python3 -m pytest

Environment:

Expected behavior:
Running python3 -m pytest with flask templates can pass on Windows and Mac

@pamelafox for notification.

@pamelafox
Copy link
Contributor

cc @kjaymiller I think we need to ditch pytest-flask given all the issues (and no 3.12 compat) and roll own. The pickle issue is discussed here: pytest-dev/pytest-flask#54

@kjaymiller
Copy link
Contributor

We ditched pytest-flask in a recent update to the source.

I'll be updating the repos (sadly it's gonna be a manual job).

I'll check back in with later today.

@pamelafox
Copy link
Contributor

pamelafox commented Dec 6, 2023

@v-jiaodi Can you see if you are still having issues? We completely changed our local testing approach for Flask and I'm hopeful it'll now work on Windows.

@kjaymiller
Copy link
Contributor

@pamelafox as I read this, did you mean that it WILL work on Windows?

@pamelafox
Copy link
Contributor

Sorry, typo, it was meant to say "now work on Windows", not "not work on Windows". Thanks for clarifying Jay!

@v-jiaodi
Copy link
Member Author

v-jiaodi commented Dec 7, 2023

@v-jiaodi Can you see if you are still having issues? We completely changed our local testing approach for Flask and I'm hopeful it'll now work on Windows.

@pamelafox Test again, this issue still exists.

@pamelafox
Copy link
Contributor

Can you share the exact error? It should be different since we changed testing package.

@v-jiaodi
Copy link
Member Author

v-jiaodi commented Dec 8, 2023

Error log as follow:
image

@pamelafox
Copy link
Contributor

Great, thank you, I am working on a fix.

@pamelafox
Copy link
Contributor

@v-jiaodi I have pushed a fix that should hopefully help for Windows, could you pull again and try?

@v-jiaodi
Copy link
Member Author

@pamelafox Test again, the error message is as follows:
image

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