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

Adding some tests #8

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

oraNod
Copy link
Collaborator

@oraNod oraNod commented Oct 11, 2024

This PR adds some initial tests.

"modified": ["MODIFIED.md"]
}
]
}
Copy link
Member

Choose a reason for hiding this comment

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

I would avoid simplified payloads like this because if we make a mistake here, then we can accidentally write our code in a way that it passes the test but doesn't work in reality. I'd much rather commit the whole payload files that we use for development. Please only make sure there is no sensitive information like email addresses.

I use real data for testing one of my other projects, and it's really reliable
https://github.com/FrostyX/fedora-review-service/tree/main/tests/data

With the added benefit that once you encounter something that doesn't work for some reason, you can add the whole payload, and fix the code.

result = subprocess.run(
[sys.executable, str(SCRIPT_PATH)] + args, capture_output=True, text=True
)
return result
Copy link
Member

Choose a reason for hiding this comment

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

IMHO we should write the tests in a way that doesn't require running the script. But we will have to make some adjustments in the script first.

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