Windows: Update pytest with echo and remove others (#45620)
* Windows: Update pytest with echo and remove others * Fix style * Remove unused pytest import in undevelop * Update test_test_part_pass to be Window compatible * Style
This commit is contained in:
parent
a42108438d
commit
434a703bcf
@ -18,8 +18,6 @@
|
||||
develop = SpackCommand("develop")
|
||||
env = SpackCommand("env")
|
||||
|
||||
pytestmark = pytest.mark.not_on_windows("does not run on windows")
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("mutable_mock_env_path", "mock_packages", "mock_fetch", "mutable_config")
|
||||
class TestDevelop:
|
||||
|
@ -334,7 +334,6 @@ def test_find_command_basic_usage(database):
|
||||
assert "mpileaks" in output
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("envirnment is not yet supported on windows")
|
||||
@pytest.mark.regression("9875")
|
||||
def test_find_prefix_in_env(
|
||||
mutable_mock_env_path, install_mockery, mock_fetch, mock_packages, mock_archive
|
||||
|
@ -16,8 +16,6 @@
|
||||
add = spack.main.SpackCommand("add")
|
||||
install = spack.main.SpackCommand("install")
|
||||
|
||||
pytestmark = pytest.mark.not_on_windows("does not run on windows")
|
||||
|
||||
|
||||
@pytest.mark.db
|
||||
def test_gc_without_build_dependency(mutable_database):
|
||||
|
@ -50,7 +50,6 @@ def fake_stage(pkg, mirror_only=False):
|
||||
return expected_path
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("PermissionError")
|
||||
def test_stage_path(check_stage_path):
|
||||
"""Verify that --path only works with single specs."""
|
||||
stage("--path={0}".format(check_stage_path), "trivial-install-test-package")
|
||||
|
@ -2,10 +2,6 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
|
||||
import pytest
|
||||
|
||||
import spack.environment as ev
|
||||
import spack.spec
|
||||
from spack.main import SpackCommand
|
||||
@ -14,8 +10,6 @@
|
||||
env = SpackCommand("env")
|
||||
concretize = SpackCommand("concretize")
|
||||
|
||||
pytestmark = pytest.mark.not_on_windows("does not run on windows")
|
||||
|
||||
|
||||
def test_undevelop(tmpdir, mutable_config, mock_packages, mutable_mock_env_path):
|
||||
# setup environment
|
||||
|
@ -205,7 +205,6 @@ def _warn(*args, **kwargs):
|
||||
|
||||
# Note: I want to use https://docs.pytest.org/en/7.1.x/how-to/skipping.html#skip-all-test-functions-of-a-class-or-module
|
||||
# the style formatter insists on separating these two lines.
|
||||
@pytest.mark.not_on_windows("Envs unsupported on Windows")
|
||||
class TestUninstallFromEnv:
|
||||
"""Tests an installation with two environments e1 and e2, which each have
|
||||
shared package installations:
|
||||
|
@ -8,8 +8,6 @@
|
||||
import spack.solver.asp
|
||||
import spack.spec
|
||||
|
||||
pytestmark = [pytest.mark.not_on_windows("Windows uses old concretizer")]
|
||||
|
||||
version_error_messages = [
|
||||
"Cannot satisfy 'fftw@:1.0' and 'fftw@1.1:",
|
||||
" required because quantum-espresso depends on fftw@:1.0",
|
||||
|
@ -19,8 +19,6 @@
|
||||
from spack.test.conftest import create_test_repo
|
||||
from spack.util.url import path_to_file_url
|
||||
|
||||
pytestmark = [pytest.mark.not_on_windows("Windows uses old concretizer")]
|
||||
|
||||
|
||||
def update_packages_config(conf_str):
|
||||
conf = syaml.load_config(conf_str)
|
||||
|
@ -27,7 +27,6 @@ def test_listing_possible_os():
|
||||
assert expected_os in output
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("test unsupported on Windows")
|
||||
@pytest.mark.maybeslow
|
||||
@pytest.mark.requires_executables("git")
|
||||
def test_bootstrap_phase(minimal_configuration, config_dumper, capsys):
|
||||
|
@ -286,6 +286,7 @@ def compilers(compiler, arch_spec):
|
||||
|
||||
|
||||
# TODO (post-34236): Remove when remove deprecated run_test(), etc.
|
||||
@pytest.mark.not_on_windows("echo not available on Windows")
|
||||
@pytest.mark.parametrize(
|
||||
"msg,installed,purpose,expected",
|
||||
[
|
||||
|
@ -4,6 +4,7 @@
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
import collections
|
||||
import os
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
@ -315,8 +316,11 @@ def test_test_part_pass(install_mockery, mock_fetch, mock_test_stage):
|
||||
name = "test_echo"
|
||||
msg = "nothing"
|
||||
with spack.install_test.test_part(pkg, name, "echo"):
|
||||
echo = which("echo")
|
||||
echo(msg)
|
||||
if sys.platform == "win32":
|
||||
print(msg)
|
||||
else:
|
||||
echo = which("echo")
|
||||
echo(msg)
|
||||
|
||||
for part_name, status in pkg.tester.test_parts.items():
|
||||
assert part_name.endswith(name)
|
||||
|
@ -12,7 +12,6 @@
|
||||
from spack.spec import Spec
|
||||
|
||||
|
||||
@pytest.mark.not_on_windows("Not supported on Windows (yet)")
|
||||
def test_remove_extensions_ordered(install_mockery, mock_fetch, tmpdir):
|
||||
view_dir = str(tmpdir.join("view"))
|
||||
layout = DirectoryLayout(view_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user