From 29ec8a9641bfd721b6c64b9a34803af3e457b0e6 Mon Sep 17 00:00:00 2001 From: Andreas Pelme Date: Sun, 15 Dec 2024 19:29:51 +0100 Subject: [PATCH] not_a_child -> invalid_child This name is more consistent. --- tests/test_children.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/test_children.py b/tests/test_children.py index f9fd6bd..5bca203 100644 --- a/tests/test_children.py +++ b/tests/test_children.py @@ -289,46 +289,46 @@ class SomeClass: ] -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_direct(not_a_child: t.Any) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_direct(invalid_child: t.Any) -> None: with pytest.raises(TypeError, match="is not a valid child element"): - div[not_a_child] + div[invalid_child] -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_wrapped_in_list(not_a_child: t.Any) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_wrapped_in_list(invalid_child: t.Any) -> None: with pytest.raises(TypeError, match="is not a valid child element"): - div[[not_a_child]] + div[[invalid_child]] -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_wrapped_in_tuple(not_a_child: t.Any) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_wrapped_in_tuple(invalid_child: t.Any) -> None: with pytest.raises(TypeError, match="is not a valid child element"): - div[(not_a_child,)] + div[(invalid_child,)] -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_nested_iterator(not_a_child: t.Any) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_nested_iterator(invalid_child: t.Any) -> None: with pytest.raises(TypeError, match="is not a valid child element"): - div[[not_a_child]] + div[[invalid_child]] -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_lazy_callable(not_a_child: t.Any, render: RenderFixture) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_lazy_callable(invalid_child: t.Any, render: RenderFixture) -> None: """ Ensure proper exception is raised for lazily evaluated invalid children. """ - element = div[lambda: not_a_child] + element = div[lambda: invalid_child] with pytest.raises(TypeError, match="is not a valid child element"): render(element) -@pytest.mark.parametrize("not_a_child", _invalid_children) -def test_invalid_child_lazy_iterator(not_a_child: t.Any, render: RenderFixture) -> None: +@pytest.mark.parametrize("invalid_child", _invalid_children) +def test_invalid_child_lazy_iterator(invalid_child: t.Any, render: RenderFixture) -> None: """ Ensure proper exception is raised for lazily evaluated invalid children. """ - element = div[SingleShotIterator(not_a_child)] + element = div[SingleShotIterator(invalid_child)] with pytest.raises(TypeError, match="is not a valid child element"): render(element)