mirror of
https://github.com/MinaSaad1/pbi-cli
synced 2026-04-21 13:37:19 +00:00
Remove the MCP server binary dependency entirely. All 22 command groups now connect directly to Power BI Desktop's Analysis Services engine via pythonnet and bundled Microsoft.AnalysisServices DLLs (~20MB, in-process). - Direct .NET TOM/ADOMD.NET interop for sub-second command execution - 7 Claude Code skills (added Diagnostics and Partitions & Expressions) - New commands: trace, transaction, calendar, expression, partition, advanced culture - 91 tests passing, all skills updated, README/CHANGELOG rewritten
42 lines
937 B
Python
42 lines
937 B
Python
"""End-to-end tests requiring a running Power BI Desktop instance.
|
|
|
|
These tests are skipped in CI unless PBI Desktop is available.
|
|
Run with: pytest -m e2e
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import subprocess
|
|
import sys
|
|
|
|
import pytest
|
|
|
|
pytestmark = pytest.mark.e2e
|
|
|
|
|
|
def _pbi(*args: str) -> subprocess.CompletedProcess[str]:
|
|
"""Run a pbi command via subprocess."""
|
|
return subprocess.run(
|
|
[sys.executable, "-m", "pbi_cli", *args],
|
|
capture_output=True,
|
|
text=True,
|
|
timeout=30,
|
|
)
|
|
|
|
|
|
def test_version() -> None:
|
|
result = _pbi("--version")
|
|
assert result.returncode == 0
|
|
assert "pbi-cli" in result.stdout
|
|
|
|
|
|
def test_help() -> None:
|
|
result = _pbi("--help")
|
|
assert result.returncode == 0
|
|
assert "pbi-cli" in result.stdout
|
|
|
|
|
|
def test_setup_info() -> None:
|
|
result = _pbi("--json", "setup", "--info")
|
|
assert result.returncode == 0
|
|
assert "version" in result.stdout
|