Skip to content

Commit

Permalink
Merge pull request #12 from aziezahmed/dev
Browse files Browse the repository at this point in the history
chore(test) fix cli test
  • Loading branch information
aziezahmed authored Apr 21, 2022
2 parents 1a8f540 + c00c310 commit 36f4e3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install flake8 pytest python-dateutil
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand All @@ -36,4 +36,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
pytest tests/test_podcast.py
8 changes: 4 additions & 4 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
from subprocess import PIPE, Popen as popen
from unittest import TestCase

from skele import __version__ as VERSION
from podcast_player import __version__ as VERSION

class TestHelp(TestCase):
def test_returns_usage_information(self):
output = popen(['skele', '-h'], stdout=PIPE).communicate()[0]
output = popen(['podcast', '-h'], stdout=PIPE).communicate()[0]
self.assertTrue('Usage:'.encode('utf-8') in output)

output = popen(['skele', '--help'], stdout=PIPE).communicate()[0]
output = popen(['podcast', '--help'], stdout=PIPE).communicate()[0]
self.assertTrue('Usage:'.encode('utf-8') in output)


class TestVersion(TestCase):
def test_returns_version_information(self):
output = popen(['skele', '--version'], stdout=PIPE).communicate()[0]
output = popen(['podcast', '--version'], stdout=PIPE).communicate()[0]
self.assertEqual(output.strip(), VERSION.encode('utf-8'))


0 comments on commit 36f4e3a

Please sign in to comment.