Skip to content
5 changes: 2 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: [push, pull_request]
jobs:
build:

runs-on: ubuntu-latest
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
Expand All @@ -20,7 +20,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt;
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -29,5 +29,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
export PYTHONPATH=source
pytest
Empty file added conftest.py
Empty file.
20 changes: 18 additions & 2 deletions test/test_with_pytest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import sys
# insert at 1, 0 is the script path (or '' in REPL)
sys.path.append('main')
sys.path.append('source')

from main import helper
from source.main import helper
from source.main import transcribe_yt
from source.main import summarize

# from main import helper

Expand All @@ -26,6 +28,20 @@ def test_analyzeText():
assert helper.analyze("sad")[0] in sentiments
assert helper.analyze("very happy")[0] in sentiments
assert helper.analyze("decent")[0] in sentiments


def test_Summary():
temp = summarize.Summary("the snail smelly old beermongers . the snail stinky old beersmonger's squirmy old").summarize_text()
assert type(temp) == list and len(temp) > 0

# def test_transcribeVideo():
# assert type(TranscribeYtVideo('https://www.youtube.com/watch?v=yaG9mFlrB8k&ab_channel=9to5Mac').transcribe_yt_video()) == str

# def test_always_fails():
# assert False


def test_transcribeVideo():
temp = transcribe_yt.TranscribeYtVideo('https://www.youtube.com/watch?v=yaG9mFlrB8k&ab_channel=9to5Mac%27')
assert type(temp.transcribe_yt_video()) == str