diff --git a/pyproject.toml b/pyproject.toml index 228be55..8ad2ee3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "hatchling.build" [project] name = "swankit" -version = "0.1.1b1" +version = "0.1.1b2" dynamic = ["readme"] description = "Base toolkit for SwanLab" license = "Apache-2.0" diff --git a/swankit/env.py b/swankit/env.py index 0cb650d..1e6214b 100644 --- a/swankit/env.py +++ b/swankit/env.py @@ -21,7 +21,7 @@ class SwanLabMode(Enum): DISABLED = "disabled" CLOUD = "cloud" - # CLOUD_ONLY = "cloud-only" + CLOUD_ONLY = "cloud-only" LOCAL = "local" @classmethod diff --git a/test/unit/test_env.py b/test/unit/test_env.py index ae8f0f0..27a1294 100644 --- a/test/unit/test_env.py +++ b/test/unit/test_env.py @@ -23,6 +23,15 @@ def test_create_time(): assert d.tzinfo == datetime.timezone.utc +def test_list_mode(): + ms = E.SwanLabMode.list() + assert len(ms) == 4 + assert "disabled" in ms + assert "cloud" in ms + assert "cloud-only" in ms + assert "local" in ms + + class TestGetFolder: """ 测试获取全局保存文件夹