From 918d4d5c0bb66eed24f96ab68e98012038424fcc Mon Sep 17 00:00:00 2001 From: Wu Zhenyu Date: Mon, 25 Dec 2023 14:55:57 +0800 Subject: [PATCH] :white_check_mark: Fix pytest --- pyproject.toml | 2 +- tests/server_test.py | 14 -------------- tests/test_utils.py | 10 ++++++++++ 3 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 tests/server_test.py create mode 100644 tests/test_utils.py diff --git a/pyproject.toml b/pyproject.toml index 0e72752..e6e4403 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,7 +103,7 @@ exclude_lines = [ ] [tool.bandit.assert_used] -skips = ["*_test.py", "test_*.py"] +skips = ["*_test.py", "*/test_*.py"] [tool.cibuildwheel] archs = ["all"] diff --git a/tests/server_test.py b/tests/server_test.py deleted file mode 100644 index 2c47ad6..0000000 --- a/tests/server_test.py +++ /dev/null @@ -1,14 +0,0 @@ -r"""Test server""" -from tmux_language_server.server import get_document - - -class Test: - r"""Test.""" - - @staticmethod - def test_get_document() -> None: - r"""Test get document. - - :rtype: None - """ - assert get_document().get("set") diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..bbb1a4e --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,10 @@ +r"""Test utils.""" +from tmux_language_server.utils import get_schema + + +class Test: + r"""Test.""" + + @staticmethod + def test_get_schema() -> None: + assert get_schema()["properties"].get("set")