File tree Expand file tree Collapse file tree
tests/usethis/_integrations/uv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -645,3 +645,30 @@ def test_dev_not_added_if_missing(self, tmp_path: Path):
645645 # Assert
646646 default_groups = get_pyproject_value (["tool" , "uv" , "default-groups" ])
647647 assert set (default_groups ) == {"test" }
648+
649+
650+ class TestGetDefaultGroups :
651+ def test_empty_pyproject_toml (self , tmp_path : Path ):
652+ # Arrange
653+ (tmp_path / "pyproject.toml" ).touch ()
654+
655+ with change_cwd (tmp_path ), PyprojectTOMLManager ():
656+ # Act
657+ result = get_default_groups ()
658+
659+ # Assert
660+ assert result == []
661+
662+ def test_invalid_default_groups (self , tmp_path : Path ):
663+ # Arrange
664+ (tmp_path / "pyproject.toml" ).write_text ("""\
665+ [tool.uv]
666+ default-groups = "not a list"
667+ """ )
668+
669+ with change_cwd (tmp_path ), PyprojectTOMLManager ():
670+ # Act
671+ result = get_default_groups ()
672+
673+ # Assert
674+ assert result == []
You can’t perform that action at this time.
0 commit comments