Skip to content

Commit bae66d2

Browse files
authored
Merge pull request #1182 from dimitri-yatsenko/key_populate
add test and change log for #989
2 parents f0d83a8 + 0d98e61 commit bae66d2

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
@@ -5,6 +5,7 @@
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 - Datajoint python CLI ([#940](https://github.com/datajoint/datajoint-python/issues/940)) PR [#1095](https://github.com/datajoint/datajoint-python/pull/1095)
77
- Added - Ability to set hidden attributes on a table - PR [#1091](https://github.com/datajoint/datajoint-python/pull/1091)
8+
- Added - Ability to specify a list of keys to popuate - PR [#989](https://github.com/datajoint/datajoint-python/pull/989)
89

910
### 0.14.2 -- Aug 19, 2024
1011
- 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_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+
assert len(keys) > n
59+
keys = keys[:n]
60+
ret = experiment.populate(keys=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)