Skip to content

Commit

Permalink
Merge pull request #1182 from dimitri-yatsenko/key_populate
Browse files Browse the repository at this point in the history
add test and change log for #989
  • Loading branch information
ethho authored Sep 13, 2024
2 parents f0d83a8 + 0d98e61 commit bae66d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed - Added encapsulating double quotes to comply with [DOT language](https://graphviz.org/doc/info/lang.html) - PR [#1177](https://github.com/datajoint/datajoint-python/pull/1177)
- Added - Datajoint python CLI ([#940](https://github.com/datajoint/datajoint-python/issues/940)) PR [#1095](https://github.com/datajoint/datajoint-python/pull/1095)
- Added - Ability to set hidden attributes on a table - PR [#1091](https://github.com/datajoint/datajoint-python/pull/1091)
- Added - Ability to specify a list of keys to popuate - PR [#989](https://github.com/datajoint/datajoint-python/pull/989)

### 0.14.2 -- Aug 19, 2024
- Added - Migrate nosetests to pytest - PR [#1142](https://github.com/datajoint/datajoint-python/pull/1142)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_autopopulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ def test_populate_with_success_count(subject, experiment, trial):
assert len(trial.key_source & trial) == success_count


def test_populate_key_list(subject, experiment, trial):
# test simple populate
assert subject, "root tables are empty"
assert not experiment, "table already filled?"
keys = experiment.key_source.fetch("KEY", order_by="KEY")
n = 3
assert len(keys) > n
keys = keys[:n]
ret = experiment.populate(keys=keys)
assert n == ret["success_count"]


def test_populate_exclude_error_and_ignore_jobs(schema_any, subject, experiment):
# test simple populate
assert subject, "root tables are empty"
Expand Down

0 comments on commit bae66d2

Please sign in to comment.