-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
test: Fix sitemap test base directory. #37
test: Fix sitemap test base directory. #37
Conversation
It looks like when the So I don't exactly understand why that behaviour appears, it might be a secondary bug that masked this one? |
When run with "pdm run invoke test", the CWD is the root of the sitemap plugin. However, the test case expects to find content in the same directory as the test source file.
c3429d9
to
30d59fb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks, Angus! Interesting… I'm not sure about the questions you raised, but it seems that you have found a solution that will suit our needs for the moment.
I took the liberty of replacing the __file__
reference with the importlib.resources.files
Python 3.9+ API.
Thanks again for your help. Much appreciated! 🏅
Oh nice, I did catch myself wondering if there was a more modern way to get this information - and now I know what it is! |
Follow-up to 3186431, as per comment here: pelican-plugins#37 (comment) - CONTENT key is unused - PATH key determines the content path
When run with "pdm run invoke test", the CWD is the root of the sitemap plugin (at least on Linux). However, the test case expects to find content in the same directory as the test source file.
Closes #36.