-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
114 lines (101 loc) · 2.92 KB
/
pyproject.toml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
[tool.isort]
profile = "black"
force_single_line = true
atomic = true
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
use_parentheses = true
src_paths = ["munet", "tests"]
skip_glob = ["*/setup.py"]
filter_files = true
known_first_party = "munet"
[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.poetryvenv
| \.venv
| _build
| buck-out
| build
| dist
| tests/.*/setup.py
)/
'''
[tool.flake8]
max-line-length = 88
ignore = "E203,E741,W504"
[tool.pylint.master_control]
init-hook='import sys; sys.path += ["tests"]'
[tool.pylint.messages_control]
disable = [
"broad-except",
"consider-using-f-string", # this would also be nice, but too much
"consider-using-with", # this would be nice if it wasn't so simple
"duplicate-code",
"fixme",
"import-outside-toplevel",
"invalid-name", # sometimes 1 char variable names are fine
"missing-function-docstring", # would be nice, a pipe-dream really
"too-few-public-methods",
"too-many-arguments",
"too-many-branches",
"too-many-instance-attributes",
"too-many-lines",
"too-many-locals",
"too-many-return-statements",
"too-many-statements",
"unknown-option-value",
]
max-line-length = 88
[tool.pylint.design]
# limiting the number of returns might discourage
# the use of guard clauses. So we increase the
# allowed number of returns from 6 to 8
max-returns = 8
[tool.pydocstyle]
convention = "google"
add_ignore = "D102,D103,D105,D107"
[tool.pytest.ini_options]
addopts = "-s"
asyncio_mode = "auto"
norecursedirs = "tests-trex/external_libs tests/manual tests-trex/podman-trex-extract tests-trex/trex* tests-trex/trex_stl_lib"
# The order of these really matters, and there's serious voodoo, it has to do
# with trex's use of it's own earlier scapy. It's not enough for utpkt to be
# before stress though, it has to be at the top (or somewhere more than just
# above stress..) who knows...; this works.
testpaths = [
"tests/config",
"tests/console",
"tests/errors",
"tests/iperf",
"tests/mtu",
"tests/phynic",
"tests/reorder",
"tests/simplenet",
"tests/utpkt",
"tests/verify",
# can't run this together b/c trex custom python lib versions
# in particular scapy.
# "tests-trex/stress",
]
log_level = "INFO"
log_format = "%(asctime)s,%(msecs)03d %(levelname)s: %(name)s: %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
# If verbose is specifyied log_cli will be set to 1, it can also be specified
# here or on the CLI.
# log_cli = 1
log_cli_level = "INFO"
log_cli_format = "%(asctime)s,%(msecs)03d %(levelname)s: %(name)s: %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
log_file = "exec-pytest.log"
log_file_level = "DEBUG"
log_file_format = "%(asctime)s,%(msecs)03d %(levelname)s: %(name)s: %(message)s"
log_file_date_format = "%Y-%m-%d %H:%M:%S"