Esempio n. 1
0
def test_copy_requires_name():
    x = Parameter("x")
    with pytest.raises(TypeError) as exc:
        x.copy()
    assert "required positional argument" in str(exc.value)
Esempio n. 2
0
def test_copy_with_new_name():
    x = Parameter("x")
    y = x.copy("y")

    assert x.name == x.slug == "x"
    assert y.name == y.slug == "y"