From b90dd0182680f2dbc68f0dc4d9d72fb21ed83fda Mon Sep 17 00:00:00 2001 From: hrz <1710360675@qq.com> Date: Wed, 2 Sep 2026 19:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=20Python=20=E5=86=92=E7=83=9F?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8C=E9=AA=8C=E8=AF=81=20pytest=20?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/tests/__init__.py | 0 main/xiaozhi-server/tests/test_smoke.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 main/xiaozhi-server/tests/__init__.py create mode 100644 main/xiaozhi-server/tests/test_smoke.py diff --git a/main/xiaozhi-server/tests/__init__.py b/main/xiaozhi-server/tests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/main/xiaozhi-server/tests/test_smoke.py b/main/xiaozhi-server/tests/test_smoke.py new file mode 100644 index 000000000..c479ed034 --- /dev/null +++ b/main/xiaozhi-server/tests/test_smoke.py @@ -0,0 +1,14 @@ +"""Smoke test — confirms pytest can collect from this directory. + +Real tests land in Slice 2 (see docs/superpowers/specs/2026-09-02-test-infrastructure-design.md). +""" + + +def test_pytest_works(): + assert 1 + 1 == 2 + + +def test_repo_path_is_writable(tmp_path): + p = tmp_path / "scratch.txt" + p.write_text("ok", encoding="utf-8") + assert p.read_text(encoding="utf-8") == "ok"