@@ -223,7 +223,7 @@ TEST_F(PythonFilterTest, metadata)
223223 " import sys\n "
224224 " import redirector\n "
225225 " def myfunc(ins,outs):\n "
226- " global metadata \n "
226+ " global out_metadata \n "
227227 " #print('before', globals(), file=sys.stderr,)\n "
228228 " out_metadata = {'name': 'root', 'value': 'a string', 'type': 'string', 'description': 'a description', 'children': [{'name': 'somechildren', 'value': 52, 'type': 'integer', 'description': 'a filter description', 'children': []}, {'name': 'otherchildren', 'value': 'another string', 'type': 'string', 'description': 'a reader description', 'children': []}]}\n "
229229 " # print ('schema', schema, file=sys.stderr,)\n "
@@ -248,13 +248,13 @@ TEST_F(PythonFilterTest, metadata)
248248
249249 PointLayoutPtr layout (table.layout ());
250250 MetadataNode m = table.metadata ();
251- m = m.findChild (" somechildren" );
252- Utils::toJSON (m, std::cerr);
251+ m = m.findChild (" filters.python" );
253252 MetadataNodeList l = m.children ();
254- EXPECT_EQ (l.size (), 3u );
255- EXPECT_EQ (l[0 ].name (), " filters.python" );
256- EXPECT_EQ (l[0 ].value (), " 52" );
257- EXPECT_EQ (l[0 ].description (), " a filter description" );
253+ EXPECT_EQ (l.size (), 2u );
254+ m = m.findChild (" children" );
255+ EXPECT_EQ (m.children ().size (), 2u );
256+ m = m.findChild (" somechildren" );
257+ EXPECT_EQ (m.value (), " 52" );
258258}
259259
260260TEST_F (PythonFilterTest, pdalargs)
0 commit comments