Skip to content

Commit 3dd4c94

Browse files
add test and change log for #989
1 parent ed9a520 commit 3dd4c94

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
- Added - `dj.Top` restriction ([#1024](https://github.com/datajoint/datajoint-python/issues/1024)) PR [#1084](https://github.com/datajoint/datajoint-python/pull/1084)
55
- 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)
66
- Added - Ability to set hidden attributes on a table - PR [#1091](https://github.com/datajoint/datajoint-python/pull/1091)
7+
- Added - Ability to specify a list of keys to popuate - PR [#989](https://github.com/datajoint/datajoint-python/pull/989)
78

89
### 0.14.2 -- Aug 19, 2024
910
- Added - Migrate nosetests to pytest - PR [#1142](https://github.com/datajoint/datajoint-python/pull/1142)

tests/test_autopopulate.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ def test_populate_with_success_count(subject, experiment, trial):
4949
assert len(trial.key_source & trial) == success_count
5050

5151

52+
def test_populate_explicit_key_list(subject, experiment, trial):
53+
# test simple populate
54+
assert subject, "root tables are empty"
55+
assert not experiment, "table already filled?"
56+
keys = experiment.key_source.fetch("KEY", order_by="KEY")
57+
n = 3
58+
keys = keys[:n]
59+
assert len(keys) == n
60+
ret = experiment.populate(keys)
61+
assert n == ret["success_count"]
62+
63+
5264
def test_populate_exclude_error_and_ignore_jobs(schema_any, subject, experiment):
5365
# test simple populate
5466
assert subject, "root tables are empty"

0 commit comments

Comments
 (0)