Skip to content

Commit c383b5d

Browse files
Test more specific error message for [dependency-groups] section validation message
1 parent 9bcadac commit c383b5d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/usethis/_integrations/uv/test_deps.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,20 @@ def test_no_pyproject(self, tmp_path: Path):
103103
# Assert
104104
assert result == {}
105105

106+
def test_invalid_dtype(self, tmp_path: Path):
107+
# Arrange
108+
(tmp_path / "pyproject.toml").write_text("""\
109+
[dependency-groups]
110+
test="not a list"
111+
""")
112+
# Act, Assert
113+
with (
114+
change_cwd(tmp_path),
115+
PyprojectTOMLManager(),
116+
pytest.raises(UVDepGroupError),
117+
):
118+
get_dep_groups()
119+
106120

107121
class TestAddDepsToGroup:
108122
@pytest.mark.usefixtures("_vary_network_conn")

0 commit comments

Comments
 (0)