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

Fix bug in test file generation #597

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

addie9800
Copy link
Collaborator

When overriding the parser test file data multiple times in a row, the script will delete the saved html every other time. Simply reordering the commands fixes this. Additionally I updated the error message to also reflect the publisher where it occured, even though it is visible by looking though the pytest summary as well, I thought this is simpler because all the necessary information is at the same place.

@addie9800 addie9800 requested a review from MaxDall August 28, 2024 12:31
@MaxDall
Copy link
Collaborator

MaxDall commented Aug 30, 2024

I have to admit I quite don't understand the problem here. Could you explain it a bit more in detail to me?

@addie9800
Copy link
Collaborator Author

addie9800 commented Sep 2, 2024

I have to admit I quite don't understand the problem here. Could you explain it a bit more in detail to me?

Sure. If you run this code snippet once: python -m scripts.generate_parser_test_files -p Tagesschau -o, it will do just what you would expect it to do. But, in case you run it again on the same date, the script will delete the saved html without replacing it with the "new" html. It's most obvious if you run the command above and look at the edited filed in the git section of PyCharm. Observe the files that appear and vanish in each step.

@addie9800 addie9800 merged commit 13859ea into master Sep 3, 2024
4 checks passed
@addie9800 addie9800 deleted the fix-override-bug-in-parser-test-files branch September 3, 2024 12:13
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

Successfully merging this pull request may close these issues.

2 participants