-
Notifications
You must be signed in to change notification settings - Fork 92
PLAT-159: Migrate test_jobs #1131
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
Conversation
ethho
commented
Dec 13, 2023
- Changes from PLAT-156: Migrate test_fetch #1129
- Changes from PLAT-157: Migrate test_fetch_same #1130
- cp to tests
- nose2pytest test_jobs
- All but two test_jobs passing
- Clean jobs table in fixture
- Change from generator to list
- Tolerate error when cleaning up schema_any.jobs
- Format with black
Later tests in test_jobs would fail because SimpleSource contents generator exhausted, so the child tables' populate reserves no jobs due to no keys.
| id : int # id | ||
| """ | ||
| contents = ((x,) for x in range(10)) | ||
| contents = [(x,) for x in range(10)] |
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.
Similar to #1129 (comment), this generator was exhausted by one test, causing failures for additional tests that required non-empty SimpleSource.contents.
| assert subjects | ||
| table_name = "fake_table" | ||
|
|
||
| key = subjects.fetch("KEY")[0] |
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.
you can limit in these cases for better performance: subjects.fetch("KEY", limit=1)[0]