Add Python 3.11 tests
This commit is contained in:
parent
5000bc6871
commit
a673880cd9
2 changed files with 12 additions and 8 deletions
18
.github/workflows/python-package.yml
vendored
18
.github/workflows/python-package.yml
vendored
|
@ -15,17 +15,21 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.10-dev
|
||||
uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2.3.1
|
||||
with:
|
||||
python-version: "3.10-dev"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3.10 -m pip install --upgrade pip
|
||||
python3.10 -m pip install --upgrade pytest pytest-cov
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade pytest pytest-cov
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
# - name: Lint with flake8
|
||||
# run: |
|
||||
|
@ -35,7 +39,7 @@ jobs:
|
|||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
python3.10 -m pytest --cov=calculator tests/
|
||||
pytest --cov=calculator tests/
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
|
|
|
@ -7,7 +7,7 @@ class Parser:
|
|||
self.tokens = iter(tokens)
|
||||
self.advance()
|
||||
|
||||
def raise_error(self, e = None):
|
||||
def raise_error(self, e=None):
|
||||
if e:
|
||||
raise Exception(f"Error: {e}")
|
||||
raise Exception("Invalid syntax")
|
||||
|
|
Loading…
Add table
Reference in a new issue