Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 717
feat: add py_pytest_main entrypoint#723
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
eea59e95fb4975aea44b5a16bfa7ed124c63f109904e9bd00File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import pytest | ||
| def test_add(): | ||
| assert 1 + 1 == 2, "Expected 1 + 1 to equal 2" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| requests==2.25.1 | ||
| pytest~=7.1 |
Uh oh!
There was an error while loading. Please reload this page.
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.
How come
py_pytest_mainbecomes a dependency to apy_test, instead of subsuming thepy_testrule?Wholly replacing the
py_testrule with a macro/rule/rule+macro seems a cleaner user interface.Uh oh!
There was an error while loading. Please reload this page.
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.
This provides an entry point for pytest, the Python test runner, and doesn't force changing loads or existing rules, and keeps
py_testthe bazel rule a generic "run a python binary that will return 0 or 1". There are other launchers, perhaps a nose entrypoint etc.This model also fits with the gazelle generation already present here.