-
Notifications
You must be signed in to change notification settings - Fork 35
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
It's not finding templates on Windows 10 #46
Comments
Thanks for the bug report, @tolomea I don't have access to a windows system for testing, but I'm currently at pycon and I'll try to see if I can scrounge up someone to help on sprint Monday. |
Let me know if there is any additional information I can provide or experiments I could do. |
I am running into the same issue on my project. What would be needed to solve this problem? |
I've been running into the same issue. I believe I've found the cause of this bug. In plugin.py line 151 the plugin gets the path to the django template library template directory by importing django.template and then accessing the For some reason the path returned by The way the An easy workaround/fix for the bug is to do the comparison case-insentively by converting both the path returned by |
(This part is less directly related to the issue. I apologize if this is deemed as too off-topic.) While looking through the plugin source to find the cause of this bug, I got a bit puzzled by the way the plugin works. From what I understand from the code, it registers itself to trace every file in This approach seems a little odd to me, especially as the plugin doesn't actually intend to trace the contents of Since the information of which parts of the template get traced and which ones aren't can be inferred from which Nodes have Again, I apologize for digressing from the original bug, and I don't want to make it sound like I'm trying to tell the maintainers what to do, I just now stumbled upon this project and so don't know the whole picture. |
Thanks @bugreport1234! That's very helpful. It sounds like running CI tests on Windows testing just got added to my to-do list. Some of the code provided by Martijn Pieters in the Stack Overflow looks to be directly relevant, too. Thank you for linking directly to the issue! I can't speak for the other co-maintainers, but I'm currently focused on trying to fix bugs and add documentation. Once we're stable and have tests for all of the current issues, I'd be happy to look at performance improvements or a refactor of the code, but can't commit to a timeline on that front. Thanks for bringing it up, though! |
I'm putting Windows CI in place (as part of moving from Travis to GitHub Actions), and the test suite is failing. In my case, it's because of these different environment variable definitions:
I don't know why TEMP is a shortname while HOME is a longname. But this breaks a comparison happening in coverage.py. |
I think this is now fixed in d287548. Let me know if it does or doesn't work. |
This is now released in v2.0.0: https://pypi.org/project/django-coverage-plugin/2.0.0/ |
I have following package versions:
.coveragerc contains:
Running pytest with:
correctly calculates coverage for the Python files in core but doesn't find any of the templates.
Running the same command, code and venv on a Linux machine works as expected and finds the templates.
The text was updated successfully, but these errors were encountered: