Skip to content

Conversation

@ethho
Copy link
Contributor

@ethho ethho commented Dec 13, 2023

id : int # id
"""
contents = ((x,) for x in range(10))
contents = [(x,) for x in range(10)]
Copy link
Contributor Author

@ethho ethho Dec 13, 2023

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.

@ethho ethho requested a review from A-Baji December 13, 2023 16:20
@ethho ethho marked this pull request as ready for review December 13, 2023 16:20
@A-Baji A-Baji merged commit e862547 into datajoint:dev-tests Dec 13, 2023
assert subjects
table_name = "fake_table"

key = subjects.fetch("KEY")[0]
Copy link
Member

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]

ethho added a commit to ethho/datajoint-python that referenced this pull request Dec 15, 2023
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.

3 participants