GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test/cmd/install.py: skip test_package_output for windows · AlexanderRichert-NOAA/spack@f14beed

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/spack/spack/test/cmd
    • install.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/spack/spack/test/cmd/install.py‎

Copy file name to clipboardExpand all lines: lib/spack/spack/test/cmd/install.py
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def test_install_dirty_flag(arguments, expected):
132132
assert args.dirty == expected
133133

134134

135+
@pytest.mark.not_on_windows("Windows logger I/O operation on closed file")
135136
def test_package_output(capsys, install_mockery, mock_fetch):
136137
"""
137138
Ensure output printed from pkgs is captured by output redirection.
@@ -141,7 +142,7 @@ def test_package_output(capsys, install_mockery, mock_fetch):
141142
# when nested AND in pytest
142143
spec = spack.concretize.concretize_one("printing-package")
143144
pkg = spec.package
144-
PackageInstaller([pkg], explicit=True, verbose=True, tests=sys.platform != "win32").install()
145+
PackageInstaller([pkg], explicit=True, verbose=True, tests=True).install()
145146

146147
with gzip.open(pkg.install_log_path, "rt") as f:
147148
out = f.read()
@@ -151,16 +152,15 @@ def test_package_output(capsys, install_mockery, mock_fetch):
151152
assert "BEFORE INSTALL" in out
152153
assert "AFTER INSTALL" in out
153154

154-
if not sys.platform == "win32":
155-
# Check that install-time test log contains check and installcheck output
156-
log_path = pkg.tester.archived_install_test_log
157-
assert os.path.exists(log_path), f"Missing install-time test log at {log_path}"
155+
# Check that install-time test log contains check and installcheck output
156+
log_path = pkg.tester.archived_install_test_log
157+
assert os.path.exists(log_path), f"Missing install-time test log at {log_path}"
158158

159-
with open(log_path, "r", encoding="utf-8") as f:
160-
test_log_contents = f.read()
159+
with open(log_path, "r", encoding="utf-8") as f:
160+
test_log_contents = f.read()
161161

162-
assert "PRINTING PACKAGE CHECK" in test_log_contents
163-
assert "PRINTING PACKAGE INSTALLCHECK" in test_log_contents
162+
assert "PRINTING PACKAGE CHECK" in test_log_contents
163+
assert "PRINTING PACKAGE INSTALLCHECK" in test_log_contents
164164

165165

166166
@pytest.mark.disable_clean_stage_check

0 commit comments

Comments
0 (0)
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.