mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
See https://realpython.com/python-namespace-package. This setup is backwards-compatible, so plugins using the old pkgutil-based setup will continue working fine. This setup has an advantage where external plugins will now be able to import modules from 'beetsplug' package for typing purposes. Previously, mypy could not resolve these modules due to presence of `__init__.py`.
41 lines
1 KiB
INI
41 lines
1 KiB
INI
[tool:pytest]
|
|
# do not litter the working directory
|
|
cache_dir = /tmp/pytest_cache
|
|
# slightly more verbose output
|
|
console_output_style = count
|
|
addopts =
|
|
# show all skipped/failed/xfailed tests in the summary except passed
|
|
-ra
|
|
--strict-config
|
|
markers =
|
|
on_lyrics_update: mark a test to run only after lyrics source code is updated
|
|
integration_test: mark a test as an integration test
|
|
|
|
[coverage:run]
|
|
data_file = .reports/coverage/data
|
|
branch = true
|
|
relative_files = true
|
|
omit = beets/test/*
|
|
|
|
[coverage:report]
|
|
precision = 2
|
|
skip_empty = true
|
|
show_missing = true
|
|
exclude_also =
|
|
@atexit.register
|
|
if TYPE_CHECKING
|
|
if typing.TYPE_CHECKING
|
|
raise AssertionError
|
|
raise NotImplementedError
|
|
|
|
[coverage:html]
|
|
show_contexts = true
|
|
|
|
[mypy]
|
|
files = beets,beetsplug,test,extra,docs
|
|
allow_any_generics = false
|
|
# FIXME: Would be better to actually type the libraries (if under our control),
|
|
# or write our own stubs. For now, silence errors
|
|
ignore_missing_imports = true
|
|
namespace_packages = true
|
|
explicit_package_bases = true
|