Commit 8278065c authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Merge branch 'in' into 'master'

Add test for the `in` operator

See merge request !15
parents f6819faf 90a8a8b9
Pipeline #8618 passed with stages
in 10 minutes and 1 second
......@@ -301,7 +301,8 @@ static auto s_has_dataset = bob::extension::FunctionDoc(
"Checks if a dataset exists inside a file",
"Checks if a dataset exists inside a file, on the specified path. "
"If the given path is relative, it is take w.r.t. to the current working directory.\n\n"
".. note:: The functions :py:meth:`has_dataset` and :py:meth:`has_key` are synonyms.",
".. note:: The functions :py:meth:`has_dataset` and :py:meth:`has_key` are synonyms. "
"You can also use the Python's ``in`` operator instead of :py:meth:`has_key`: ``key in hdf5file``.",
......@@ -477,6 +477,7 @@ def test_copy_constructor():
assert shallow.has_group("/Test")
assert shallow.has_key("/Test/Data")
assert "/Test/Data" in shallow
assert hdf5.filename == shallow.filename
assert hdf5.keys() == shallow.keys()
assert hdf5.cwd == shallow.cwd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment