Skip to content

Commit

Permalink
add test and change log for datajoint#989
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitri-yatsenko committed Sep 12, 2024
1 parent ed9a520 commit 3dd4c94
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 @@ -4,6 +4,7 @@
- Added - `dj.Top` restriction ([#1024](https://github.com/datajoint/datajoint-python/issues/1024)) PR [#1084](https://github.com/datajoint/datajoint-python/pull/1084)
- 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 - 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_explicit_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
keys = keys[:n]
assert len(keys) == n
ret = experiment.populate(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 3dd4c94

Please sign in to comment.