Skip to content

Commit

Permalink
Merge pull request #12 from anaconda-distribution/v0.1.2
Browse files Browse the repository at this point in the history
v0.1.2 - Minor test fixes
  • Loading branch information
schuylermartin45 authored Nov 6, 2023
2 parents 4f4657c + a831d60 commit 0ac4951
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
Note: version releases in the 0.x.y range may introduce breaking changes.

## 0.1.2
- Minor release, disabling some tests on Windows

## 0.1.1
- Minor release, fixes a handful of issues in `environment.yaml`

Expand Down
10 changes: 10 additions & 0 deletions anaconda_packaging_utils/tests/cli/test_subshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
Description: Tests subshell utility library
TODO Proper mocking for `subprocess.run()`
"""
import platform

import pytest

from anaconda_packaging_utils.cli import subshell

TEST_PATH = "anaconda_packaging_utils/tests"


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_success() -> None:
"""
Ensures STDOUT is captured and a success code is returned
Expand All @@ -18,6 +23,7 @@ def test_run_shell_success() -> None:
assert result.returncode == 0


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_failure() -> None:
"""
Ensures STDERR is captured and a failure code is returned
Expand All @@ -28,6 +34,7 @@ def test_run_shell_failure() -> None:
assert result.returncode != 0


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_chain_success() -> None:
"""
Ensures STDOUT is captured and a success code is returned if all chained
Expand All @@ -48,6 +55,7 @@ def test_run_shell_chain_success() -> None:
assert result.returncode == 0


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_chain_failure_continue() -> None:
"""
Ensures STDERR is captured and a failure code is returned in the event
Expand All @@ -73,6 +81,7 @@ def test_run_shell_chain_failure_continue() -> None:
assert results[2].returncode == 0


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_chain_failure_fail_fast() -> None:
"""
Ensures STDERR is captured and a failure code is returned in the event
Expand All @@ -96,6 +105,7 @@ def test_run_shell_chain_failure_fail_fast() -> None:
assert results[1].returncode != 0


@pytest.mark.skipif(platform.system() == "Windows", reason="`subshell` is not supported on Windows")
def test_run_shell_chain_can_cd() -> None:
"""
Ensures that `cd` commands change the current working directory of a series
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespaces = false

[project]
name = "anaconda_packaging_utils"
version = "0.1.1"
version = "0.1.2"
authors = [
{ name="Anaconda, Inc.", email="[email protected]" },
]
Expand Down

0 comments on commit 0ac4951

Please sign in to comment.