Move tests directory

dev
Kyle Prestel 2021-07-31 08:40:29 -04:00
rodzic 27b9b052ef
commit 993ba05f6c
8 zmienionych plików z 256 dodań i 563 usunięć

Wyświetl plik

@ -1,3 +1,3 @@
FROM ghcr.io/linuxserver/nextcloud
COPY test/data /data
COPY test/config /config
COPY tests/data /data
COPY tests/config /config

Wyświetl plik

@ -1,5 +1,5 @@
.PHONY: clean-pyc test clean-build
TEST_PATH=tests
TEST_PATH=test
clean-pyc:
find . -name '*.pyc' -exec rm --force {} +
@ -20,12 +20,12 @@ isort:
lint:
flake8 --exclude=.tox
test: clean-pyc
test: clean-pyc build-test start-nextcloud-test-instance
tox
black:
black deck/
black test/
black tests/
create-volumes:
docker volume create nextcloud-data
@ -34,10 +34,15 @@ create-volumes:
build-test-image:
docker build -t nextcloud-test .
build-test: create-volumes build-test-image
build:
poetry build
deploy: build
poetry publish
publish: deploy
publish: deploy
start-nextcloud-test-instance:
./bin/start-nextcloud.sh

0
bin/start-nextcloud.sh 100644 → 100755
Wyświetl plik

Wyświetl plik

@ -5,7 +5,6 @@ import typing
import attr
import cattr
import dateutil
from cattr.preconf.json import make_converter
from dateutil.parser import parse
@ -30,10 +29,10 @@ def json_to_snake(d):
}
def deserialize(model: typing.Generic[T]) -> T:
def deserialize(model: typing.Generic[T]) -> typing.Callable:
def outer(fn):
@functools.wraps(fn)
def inner(*args, **kwargs):
def inner(*args, **kwargs) -> T:
json_ = fn(*args, **kwargs)
json_ = json_to_snake(json_)
return cattr.structure(json_, model)
@ -71,8 +70,8 @@ class Card:
archived: bool
notified: bool = False
deleted_at: int = 0
duedate: str = None
description: str = None
duedate: typing.Optional[str] = None
description: typing.Optional[str] = None
type: str = "plain"
labels: typing.Optional[typing.List[Label]] = attr.Factory(list)

784
poetry.lock wygenerowano

Plik diff jest za duży Load Diff

Wyświetl plik

@ -17,11 +17,12 @@ dateutils = "^0.6.12"
[tool.poetry.dev-dependencies]
pytest = "^6.2.4"
black = "^21.6b0"
black = { version = "*", allow-prereleases = true }
mypy = "^0.902"
isort = "^5.8.0"
tox = "^3.23.1"
tox-poetry = "^0.4.0"
flake8-black = "^0.2.1"
[build-system]
requires = ["poetry>=0.12"]

Wyświetl plik

@ -16,6 +16,12 @@ deps = flake8
commands = flake8
[flake8]
# Recommend matching the black line length (default 88),
# rather than using the flake8 default of 79:
max-line-length = 88
extend-ignore =
# See https://github.com/PyCQA/pycodestyle/issues/373
E203,
ignore = F401
exclude =
.git,