MCPcopy Create free account
hub / github.com/PyTables/PyTables / test07_walkNodes

Method test07_walkNodes

tables/tests/test_links.py:253–269  ·  view source on GitHub ↗

Checking `walk_nodes` with `classname` option.

(self)

Source from the content-addressed store, hash-verified

251 )
252
253 def test07_walkNodes(self):
254 """Checking `walk_nodes` with `classname` option."""
255
256 links = [
257 node._v_pathname
258 for node in self.h5file.walk_nodes("/", classname="Link")
259 ]
260 if common.verbose:
261 print("detected links (classname='Link'):", links)
262 self.assertEqual(links, ["/larr2", "/lgroup1", "/group1/larr1"])
263 links = [
264 node._v_pathname
265 for node in self.h5file.walk_nodes("/", classname="SoftLink")
266 ]
267 if common.verbose:
268 print("detected links (classname='SoftLink'):", links)
269 self.assertEqual(links, ["/larr2", "/lgroup1", "/group1/larr1"])
270
271 def test08__v_links(self):
272 """Checking `Group._v_links`."""

Callers

nothing calls this directly

Calls 1

walk_nodesMethod · 0.80

Tested by

no test coverage detected