1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
[tox]
envlist = py36,py37,py38,py39,flake8
[testenv]
commands = python -m unittest --buffer {posargs}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
passenv = HOME
[testenv:cover]
commands = coverage run --omit="git/test/*" -m unittest --buffer {posargs}
coverage report
[testenv:flake8]
commands = flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 {posargs}
[testenv:type]
description = type check ourselves
deps =
{[testenv]deps}
mypy
commands =
mypy -p git
[testenv:venv]
commands = {posargs}
[flake8]
#show-source = True
# E265 = comment blocks like @{ section, which it can't handle
# E266 = too many leading '#' for block comment
# E731 = do not assign a lambda expression, use a def
# W293 = Blank line contains whitespace
# W504 = Line break after operator
# E707 = multiple statements in one line - used for @overloads
ignore = E265,W293,E266,E731,E704, W504
max-line-length = 120
exclude = .tox,.venv,build,dist,doc,git/ext/
[pytest]
python_files =
test_*.py
# space seperated list of paths from root e.g test tests doc/testing
testpaths = test
# --cov coverage
# --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml
# --cov-report term-missing # to terminal with line numbers
# --cov-report html:path # html file at path
# --maxfail # number of errors before giving up
# -disable-warnings # Disable pytest warnings (not codebase warnings)
#-rf # increased reporting of failures
# -rE # increased reporting of errors
# --ignore-glob=**/gitdb/* # ignore glob paths
addopts = --cov=git --cov-report=term --maxfail=50 -rf --verbosity=0 --disable-warnings
# ignore::WarningType # ignores those warnings
# error # turn any unignored warning into errors
filterwarnings =
ignore::DeprecationWarning
|