Skip to content

Commit

Permalink
Fix path bugand remove windows tests at the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiencelier committed Nov 6, 2019
1 parent 67930d1 commit 6d2f382
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
python-version: ["3.7", "3.8"]
os: ["windows-latest", "ubuntu-latest"] # add 'macOS-latest' once support for Python 3.8 is ready
os: ["ubuntu-latest"] # add 'macOS-latest' once support for Python 3.8 is ready # add "windows-latest" when possible
runs-on: ${{ matrix.os }}
name: Testing - Python ${{ matrix.python-version }} - ${{ matrix.os }}
steps:
Expand Down
16 changes: 16 additions & 0 deletions test/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""Test the CLI."""

from subprocess import check_output


def test_cli_help():
"""Check 'universions -h'."""
output = check_output(["universions", "-h"])
assert str(output, encoding="utf-8").startswith("usage: universions")
output = check_output(["universions", "--help"])
assert str(output, encoding="utf-8").startswith("usage: universions")


def test_cli_help():
output = check_output(["universions", "java"])
assert str(output, encoding="utf-8").startswith("usage: universions")
3 changes: 2 additions & 1 deletion universions/_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def exec_command(
The result of the command.
"""
cmd = " ".join([str(part) for part in parts])
#  cmd = " ".join([str(part) for part in parts])
cmd = [str(part) for part in parts]
stderr = subprocess.STDOUT if use_stderr else PIPE
result_string, _ = Popen(cmd, stdout=PIPE, stderr=stderr).communicate()
if isinstance(result_string, bytes):
Expand Down

0 comments on commit 6d2f382

Please sign in to comment.