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

Test content generation with git diff return value #3044

Merged
merged 2 commits into from Oct 28, 2023

Conversation

copperchin
Copy link
Contributor

Rather than trying to parse output of subprocess, just check the return value.

Fix #3042

Pull Request Checklist

  • Ensured tests pass and (if applicable) updated functional test output
  • Conformed to code style guidelines by running appropriate linting tools
  • Added tests for changed code

@avaris
Copy link
Member

avaris commented Sep 16, 2022

This doesn't show the diff output in case of a failure, which is really helpful to diagnose the issue.

pelican/tests/test_pelican.py Outdated Show resolved Hide resolved
pelican/tests/test_pelican.py Outdated Show resolved Hide resolved
@copperchin copperchin force-pushed the fix-3042 branch 2 times, most recently from 163baf4 to c31503f Compare November 6, 2022 05:10
Assert equal dirs by return value of diff subprocess, rather than its output.

This prevents tests from failing when file contents are the same but the
file modes are different.

Fix getpelican#3042
and minor tweaks to subprocess handling
@avaris
Copy link
Member

avaris commented Oct 28, 2023

FYI, I also added a commit to skip git related tests if git is not installed.

Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks to @copperchin for the enhancement and to @avaris for the review and follow-up improvements. 🏅

@justinmayer justinmayer merged commit a20bbb5 into getpelican:master Oct 28, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Generation tests on master branch fail due to differing filemodes
3 participants