diff --git a/CHANGELOG.md b/CHANGELOG.md index 330e0695..c4e7b620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/tests/test_autopopulate.py b/tests/test_autopopulate.py index d1f0726e..580fb406 100644 --- a/tests/test_autopopulate.py +++ b/tests/test_autopopulate.py @@ -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"