Skip to content

Commit

Permalink
update and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderWillner committed Nov 10, 2024
1 parent 3c2a2d4 commit b12167c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
environment: github-pages
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.13"

- name: Publish to PyPi
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
# verson 3.7 too old (pylint does not know R0917)
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ code-lint: code-style ## Lint the code
@echo Flake...
@if type flake8 >/dev/null 2>&1 ; then flake8 . ; \
else echo "SKIPPED. Run '$(PIP) install flake8' first." >&2 ; fi

code-check-types: ## Check the code types
@echo Pyright...
@if type pyright >/dev/null 2>&1 ; then PYRIGHT_PYTHON_FORCE_VERSION=latest pyright *.py $(SRC_CORE) $(SRC_TEST) ; \
else echo "SKIPPED. Run 'npm install -f pyright' first." >&2 ; fi
Expand Down
2 changes: 2 additions & 0 deletions tests/test_things.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
import io
import os
import time
import tracemalloc
import sqlite3
import unittest
import unittest.mock

import things
import things.database

tracemalloc.start()

TEST_DATABASE_FILEPATH = "tests/main.sqlite"
TEST_DATABASE_FILEPATH_2022 = "tests/db2022/main.sqlite"
Expand Down
2 changes: 1 addition & 1 deletion things/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __init__(self, filepath=None, print_sql=False):

# Core methods

def get_tasks( # pylint: disable=R0914
def get_tasks( # pylint: disable=R0914,R0917
self,
uuid: Optional[str] = None,
type: Optional[str] = None, # pylint: disable=W0622
Expand Down

0 comments on commit b12167c

Please sign in to comment.