Peano
Loading...
Searching...
No Matches
conftest.py
Go to the documentation of this file.
1
"""!
2
Repository-wide pytest configuration for everything under tests/
3
4
Some ExaParty experiment scripts are called test_*.py but are command-line
5
generator scripts, not pytest modules. Importing them would run the
6
generator, so we exclude them from collection. Their pytest entry point is
7
tests/exaparty/test_exaparty.py.
8
"""
9
10
import
tempfile
11
from
pathlib
import
Path
12
13
collect_ignore_glob = [
14
"exaparty/*/test_periodic_BC-*.py"
,
15
"exaparty/*/test_smoothing_length_computation_*.py"
,
16
]
17
18
19
def
pytest_configure
(config):
20
"""!
21
Write the log of peano4.api.Logger into a temporary directory
22
23
The logger flushes its log into log.md in the current working directory
24
when the interpreter exits. Without this hook, every pytest run would
25
leave a log-<timestamp>.md file in the repository root.
26
"""
27
from
peano4.api.Logger
import
Logger
28
29
Logger().file_name = str(Path(tempfile.mkdtemp(prefix=
"peano-log-"
)) /
"log.md"
)
peano4.api.Logger.Logger
Singleton logger for the Peano 4 Python API.
Definition
Logger.py:37
conftest.pytest_configure
pytest_configure(config)
Write the log of peano4.api.Logger into a temporary directory.
Definition
conftest.py:19
tests
conftest.py
Generated on Tue Nov 3 2026 16:05:42 for Peano by
1.9.8