-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from cwendt94/develop
add some int test for basketball. Add deploy action
- Loading branch information
Showing
7 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Python package release | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python setup.py install | ||
pip install twine | ||
- name: Build Python package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Twine check | ||
run: twine check dist/* | ||
|
||
- name: Publish to PyPI | ||
run: twine upload dist/* -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from unittest import TestCase | ||
from espn_api.basketball import League | ||
|
||
# Integration test to make sure ESPN's API didnt change | ||
class LeagueTest(TestCase): | ||
|
||
def test_league_init(self): | ||
league = League(411647, 2019) | ||
|
||
self.assertEqual(league.scoringPeriodId, 178) | ||
|
||
def test_league_scoreboard(self): | ||
league = League(411647, 2019) | ||
scores = league.scoreboard() | ||
|
||
self.assertEqual(scores[0].home_final_score, 4240.0) | ||
self.assertEqual(scores[0].away_final_score, 2965.0) | ||
|
||
def test_past_league(self): | ||
league = League(411647, 2017) | ||
|
||
self.assertEqual(league.scoringPeriodId, 170) | ||
|
||
def test_past_league_scoreboard(self): | ||
league = League(411647, 2017) | ||
scores = league.scoreboard() | ||
|
||
self.assertEqual(scores[0].home_final_score, 4211.0) | ||
self.assertEqual(scores[0].away_final_score, 3548.5) |