Skip to content

Commit a6257a3

Browse files
committed
test(packaging): isolate source-tree version fallback
1 parent d4a777f commit a6257a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_packaging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_module_version_matches_package_metadata(self):
108108

109109
assert mcp_server_python_docs.__version__ == version("mcp-server-python-docs")
110110

111-
def test_source_tree_import_without_installed_metadata(self):
111+
def test_source_tree_import_without_installed_metadata(self, tmp_path: Path):
112112
"""Source-tree import falls back to pyproject.toml when metadata is absent."""
113113
env = os.environ.copy()
114114
env["PYTHONPATH"] = str(PROJECT_ROOT / "src")
@@ -123,6 +123,7 @@ def test_source_tree_import_without_installed_metadata(self):
123123
text=True,
124124
timeout=10,
125125
env=env,
126+
cwd=str(tmp_path),
126127
)
127128
assert result.returncode == 0, (
128129
f"Source-tree import failed.\n"

0 commit comments

Comments
 (0)