refer the node-from-parent deprecation documentation in the warning

fixup: fix test for warning
This commit is contained in:
Ronny Pfannschmidt
2020-02-06 00:00:02 +01:00
parent 5fc80d8bc3
commit 3d390940d1
2 changed files with 5 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ def test_node_direct_ctor_warning():
ms = MockConfig()
with pytest.warns(
DeprecationWarning,
match="direct construction of .* has been deprecated, please use .*.from_parent",
match="Direct construction of .* has been deprecated, please use .*.from_parent.*",
) as w:
nodes.Node(name="test", config=ms, session=ms, nodeid="None")
assert w[0].lineno == inspect.currentframe().f_lineno - 1