forked from p15670423/monkey
Modify pytest configuration
Shift it from monkey/pytest.ini to pyproject.toml. Add conftest.py in tests/ to add monkey directory to sys.path so test files recognize paths.
This commit is contained in:
parent
dc0e155c31
commit
c37ae1e0ea
|
@ -1,7 +0,0 @@
|
||||||
[pytest]
|
|
||||||
log_cli = 1
|
|
||||||
log_cli_level = DEBUG
|
|
||||||
log_cli_format = %(asctime)s [%(levelname)s] %(module)s.%(funcName)s.%(lineno)d: %(message)s
|
|
||||||
log_cli_date_format=%H:%M:%S
|
|
||||||
addopts = -v --capture=sys --ignore=common/cloud/scoutsuite
|
|
||||||
norecursedirs = node_modules dist
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
MONKEY_BASE_PATH = str(Path(__file__).parent.parent)
|
||||||
|
sys.path.insert(0, MONKEY_BASE_PATH)
|
|
@ -12,3 +12,13 @@ include_trailing_comma = true
|
||||||
force_grid_wrap = 0
|
force_grid_wrap = 0
|
||||||
use_parentheses = true
|
use_parentheses = true
|
||||||
ensure_newline_before_comments = true
|
ensure_newline_before_comments = true
|
||||||
|
|
||||||
|
[tool.pytest.ini_options]
|
||||||
|
minversion = "6.0"
|
||||||
|
log_cli = 1
|
||||||
|
log_cli_level = "DEBUG"
|
||||||
|
log_cli_format = "%(asctime)s [%(levelname)s] %(module)s.%(funcName)s.%(lineno)d: %(message)s"
|
||||||
|
log_cli_date_format = "%H:%M:%S"
|
||||||
|
addopts = "-v --capture=sys"
|
||||||
|
norecursedirs = "node_modules dist"
|
||||||
|
testpaths = "monkey/tests"
|
||||||
|
|
Loading…
Reference in New Issue