Skip to content

Commit

Permalink
Replaced setup.cfg to assist with tests not picking up the module names.
Browse files Browse the repository at this point in the history
  • Loading branch information
mortolian committed Jan 17, 2023
1 parent 71b5aa7 commit 3929559
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ venv-update: ## Updates the VENV with a new Python version.
python3 -m venv venv/

test: ## Run UNIT and Functional Tests with PyTest.
pytest tests --cov -s
python -m pytest tests/ -vv --cov -s

lint: ## Run a code style linter (flake8) over the app code.
flake8 backup/
Expand Down
13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,22 @@ Home = "https://github.com/mortolian/rsync-remote-backup"
[project.optional-dependencies]
test = []

[tool.setuptools.packages.find]
where = ["backup", "tests"] # list of folders that contain the packages (["."] by default)
include = ["*"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = true # to disable scanning PEP 420 namespaces (true by default)

[project.scripts]
my-script = "my_package.module:function"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests"
]

[tool.flake8]
count = true
max-line-length = 88
Expand Down
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is only here to assist with PyTest

[options]
package_dir=
=backup
packages=find:
File renamed without changes.

0 comments on commit 3929559

Please sign in to comment.