Skip to content

Commit 6d8cb6f

Browse files
fix: CI test assertions for Rich line-wrapping and scope output (#510)
- Windows unit test: shorten assertion substring to tolerate Rich Console word-wrapping on long Windows temp paths - Release validation scripts (bash + PowerShell): match 'No APM dependencies installed' instead of stale 'yet' suffix removed by #452 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8b14e59 commit 6d8cb6f

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

scripts/test-dependency-integration.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ EOF
6464
echo "--- OUTPUT START ---"
6565
echo "$deps_output"
6666
echo "--- OUTPUT END ---"
67-
if echo "$deps_output" | grep -q "No APM dependencies installed yet"; then
67+
if echo "$deps_output" | grep -q "No APM dependencies installed"; then
6868
log_success "Correctly shows no dependencies installed"
6969
else
70-
log_error "Expected 'No APM dependencies installed yet' message"
70+
log_error "Expected 'No APM dependencies installed' message"
7171
log_error "Got: $deps_output"
7272
return 1
7373
fi
@@ -256,7 +256,7 @@ test_dependency_cleanup() {
256256
echo "--- OUTPUT START ---"
257257
echo "$deps_output_after_cleanup"
258258
echo "--- OUTPUT END ---"
259-
if echo "$deps_output_after_cleanup" | grep -q "No APM dependencies installed yet"; then
259+
if echo "$deps_output_after_cleanup" | grep -q "No APM dependencies installed"; then
260260
log_success "Correctly shows no dependencies after cleanup"
261261
else
262262
log_error "Expected no dependencies after cleanup"

scripts/windows/test-dependency-integration.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ scripts:
6060
Write-Host "--- OUTPUT START ---"
6161
Write-Host $depsOutput
6262
Write-Host "--- OUTPUT END ---"
63-
if ($depsOutput -match "No APM dependencies installed yet") {
63+
if ($depsOutput -match "No APM dependencies installed") {
6464
Write-DepSuccess "Correctly shows no dependencies installed"
6565
} else {
66-
Write-DepError "Expected 'No APM dependencies installed yet' message"
66+
Write-DepError "Expected 'No APM dependencies installed' message"
6767
Write-DepError "Got: $depsOutput"
6868
return $false
6969
}
@@ -282,7 +282,7 @@ function Test-DependencyCleanup {
282282
Write-Host "--- OUTPUT START ---"
283283
Write-Host $depsOutput
284284
Write-Host "--- OUTPUT END ---"
285-
if ($depsOutput -match "No APM dependencies installed yet") {
285+
if ($depsOutput -match "No APM dependencies installed") {
286286
Write-DepSuccess "Correctly shows no dependencies after cleanup"
287287
} else {
288288
Write-DepError "Expected no dependencies after cleanup"

tests/unit/test_install_command.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,9 @@ def test_global_rejects_local_path_package(self):
818818
)
819819

820820
# Should fail with clear message about local packages
821-
assert "local packages are not supported at user scope" in result.output
821+
# Use shorter substring to tolerate Rich word-wrapping on
822+
# platforms with long temp paths (Windows).
823+
assert "not supported at user scope" in result.output
822824
# Should suggest using remote reference
823825
assert "owner/repo" in result.output
824826
finally:
@@ -840,7 +842,7 @@ def test_global_rejects_absolute_local_path(self):
840842
cli, ["install", "--global", str(local_pkg)]
841843
)
842844

843-
assert "local packages are not supported at user scope" in result.output
845+
assert "not supported at user scope" in result.output
844846
finally:
845847
os.chdir(self.original_dir)
846848

@@ -857,6 +859,6 @@ def test_global_rejects_tilde_local_path(self):
857859
cli, ["install", "--global", "~/some-pkg"]
858860
)
859861

860-
assert "local packages are not supported at user scope" in result.output
862+
assert "not supported at user scope" in result.output
861863
finally:
862864
os.chdir(self.original_dir)

0 commit comments

Comments
 (0)