@@ -61,7 +61,7 @@ def test_typical_usage(self):
6161 kd .slice (['How tall is Obama' , 'How high is the Eiffel tower' ]),
6262 )
6363 kd .testing .assert_equivalent (
64- queries .get (with_descendants = True ),
64+ queries .get (populate_including_descendants = [ queries ] ),
6565 kd .slice ([
6666 expected_query_schema .new (query_id = 0 , text = 'How tall is Obama' ),
6767 expected_query_schema .new (
@@ -772,7 +772,7 @@ def branch_and_filter(
772772 root = DataSliceManagerView (manager )
773773 filtered_root = DataSliceManagerView (filtered_manager )
774774 kd .testing .assert_equivalent (
775- root .get_data_slice (with_descendants = True ),
775+ root .get_data_slice (populate_including_descendants = [ root ] ),
776776 kd .new (
777777 query = kd .list ([
778778 kd .named_schema ('query' ).new (
@@ -802,7 +802,9 @@ def branch_and_filter(
802802 )
803803 # The filtering recipe above results in one query with one doc:
804804 kd .testing .assert_equivalent (
805- filtered_root .get_data_slice (with_descendants = True ),
805+ filtered_root .get_data_slice (
806+ populate_including_descendants = [filtered_root ]
807+ ),
806808 kd .new (
807809 query = kd .list ([
808810 kd .named_schema ('query' ).new (
@@ -953,7 +955,7 @@ def _test_filter_docs_from_view(
953955 ),
954956 )
955957 kd .testing .assert_equivalent (
956- root .get_data_slice (with_descendants = True ),
958+ root .get_data_slice (populate_including_descendants = [ root ] ),
957959 trunk_initial_data_manager .get_schema ().new (
958960 query = kd .list ([
959961 query_schema .new (
@@ -1010,8 +1012,10 @@ def _test_filter_docs_from_view(
10101012 description = 'Filtered docs by selecting all of them' ,
10111013 )
10121014 kd .testing .assert_equivalent (
1013- root .get_data_slice (with_descendants = True ),
1014- trunk_root .get_data_slice (with_descendants = True ),
1015+ root .get_data_slice (populate_including_descendants = [root ]),
1016+ trunk_root .get_data_slice (
1017+ populate_including_descendants = [trunk_root ]
1018+ ),
10151019 ids_equality = True ,
10161020 )
10171021 branch_manager_revision_descriptions = [
@@ -1038,7 +1042,7 @@ def _test_filter_docs_from_view(
10381042 description = 'Filtered all docs' ,
10391043 )
10401044 kd .testing .assert_equivalent (
1041- root .get_data_slice (with_descendants = True ),
1045+ root .get_data_slice (populate_including_descendants = [ root ] ),
10421046 trunk_root .get_data_slice ()
10431047 .with_attr ('query' , None )
10441048 .with_schema (trunk_root .get_schema ()),
@@ -1079,7 +1083,7 @@ def _test_filter_docs_from_view(
10791083 ),
10801084 )
10811085 kd .testing .assert_equivalent (
1082- root .get_data_slice (with_descendants = True ),
1086+ root .get_data_slice (populate_including_descendants = [ root ] ),
10831087 trunk_initial_data_manager .get_schema ().new (
10841088 query = kd .list ([
10851089 query_schema .new (
@@ -1114,8 +1118,16 @@ def _test_filter_docs_from_view(
11141118 trunk_root .query [:].get_data_slice ().S [1 ].get_itemid (),
11151119 )
11161120 kd .testing .assert_equivalent (
1117- root .query [:].doc [:].get_data_slice (with_descendants = True ).L [0 ],
1118- trunk_root .query [:].doc [:].get_data_slice (with_descendants = True ).L [1 ],
1121+ root .query [:]
1122+ .doc [:]
1123+ .get_data_slice (populate_including_descendants = [root .query [:].doc [:]])
1124+ .L [0 ],
1125+ trunk_root .query [:]
1126+ .doc [:]
1127+ .get_data_slice (
1128+ populate_including_descendants = [trunk_root .query [:].doc [:]]
1129+ )
1130+ .L [1 ],
11191131 ids_equality = True ,
11201132 )
11211133 branch_manager_revision_descriptions = [
@@ -1144,7 +1156,7 @@ def _test_filter_docs_from_view(
11441156 description = 'Filtered token keys to keep only those that are "hands"' ,
11451157 )
11461158 kd .testing .assert_equivalent (
1147- root .get_data_slice (with_descendants = True ),
1159+ root .get_data_slice (populate_including_descendants = [ root ] ),
11481160 trunk_initial_data_manager .get_schema ().new (
11491161 query = kd .list ([
11501162 query_schema .new (
@@ -1182,7 +1194,7 @@ def _test_filter_docs_from_view(
11821194 )
11831195
11841196 kd .testing .assert_equivalent (
1185- root .get_data_slice (with_descendants = True ),
1197+ root .get_data_slice (populate_including_descendants = [ root ] ),
11861198 trunk_initial_data_manager .get_schema ().new (
11871199 query = kd .list ([
11881200 query_schema .new (
@@ -1234,7 +1246,7 @@ def _test_filter_docs_from_view(
12341246 )
12351247
12361248 kd .testing .assert_equivalent (
1237- root .get_data_slice (with_descendants = True ),
1249+ root .get_data_slice (populate_including_descendants = [ root ] ),
12381250 trunk_initial_data_manager .get_schema ().new (
12391251 query = kd .list ([
12401252 query_schema .new (
@@ -1322,7 +1334,7 @@ def _test_filter_docs_from_view(
13221334 description = 'Filtered docs to keep only those with tokens' ,
13231335 )
13241336 kd .testing .assert_equivalent (
1325- root .get ( with_descendants = True ),
1337+ root .get_data_slice ( populate_including_descendants = [ root ] ),
13261338 trunk_initial_data_manager .get_schema ().new (
13271339 query = kd .list ([
13281340 query_schema .new (
@@ -1370,7 +1382,7 @@ def _test_filter_docs_from_view(
13701382 ),
13711383 )
13721384 kd .testing .assert_equivalent (
1373- root .get (with_descendants = True ),
1385+ root .get (populate_including_descendants = [ root ] ),
13741386 trunk_initial_data_manager .get_schema ().new (
13751387 query = kd .list ([
13761388 query_schema .new (
@@ -1435,7 +1447,8 @@ def test_error_messages_when_sugar_does_not_apply_to_attribute_name(self):
14351447
14361448 # IPython auto-complete should not suggest the reserved attribute names.
14371449 self .assertEqual (
1438- kd .dir (root .get_data_slice (with_descendants = True )), ['fingerprint' ]
1450+ kd .dir (root .get_data_slice (populate_including_descendants = [root ])),
1451+ ['fingerprint' ],
14391452 )
14401453 self .assertNotIn ('fingerprint' , root .__all__ )
14411454 self .assertEqual (
@@ -1842,19 +1855,9 @@ def test_get_with_populate_arguments(self):
18421855 schemas_equality = False ,
18431856 )
18441857
1845- kd .testing .assert_equivalent (
1846- doc_view .get (populate_including_descendants = [doc_view ]),
1847- doc_view .get (with_descendants = True ),
1848- ids_equality = True ,
1849- )
1850- kd .testing .assert_equivalent (
1851- query_view .get (populate_including_descendants = [query_view ]),
1852- query_view .get (with_descendants = True ),
1853- ids_equality = True ,
1854- )
18551858 kd .testing .assert_equivalent (
18561859 doc_view .get (populate_including_descendants = [query_view ]),
1857- doc_view .get (with_descendants = True ),
1860+ doc_view .get (populate_including_descendants = [ doc_view ] ),
18581861 ids_equality = True ,
18591862 )
18601863 kd .testing .assert_equivalent (
@@ -1866,18 +1869,7 @@ def test_get_with_populate_arguments(self):
18661869 root_view .get (
18671870 populate = [doc_view ], populate_including_descendants = [query_view ]
18681871 ),
1869- root_view .get (with_descendants = True ),
1870- ids_equality = True ,
1871- )
1872- kd .testing .assert_equivalent (
1873- root_view .get (
1874- populate = [query_view .text , query_view .query_id ],
1875- populate_including_descendants = [doc_view ],
1876- ),
1877- root_view .get (
1878- populate = [query_view .text , query_view .query_id ],
1879- populate_including_descendants = [doc_view ],
1880- ),
1872+ root_view .get (populate_including_descendants = [root_view ]),
18811873 ids_equality = True ,
18821874 )
18831875
0 commit comments