Skip to content

Commit

Permalink
Update collection build ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Nov 22, 2024
1 parent af75fec commit 4afa991
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ tmp/
*.egg
build
htmlcov
*.tar.gz
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COLLECTION_VERSION = $$(yq '.version' < galaxy.yml)
all: install version lint pytest verify

pytest: install
poetry run pytest tests
poetry run pytest tests/pytest
@echo

test: pytest verify
Expand Down
2 changes: 2 additions & 0 deletions galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ homepage: https://github.com/nephelaiio/ansible-collection-plugins
issues: https://github.com/nephelaiio/ansible-collection-plugins/issues
build_ignore:
- Makefile
- .venv
- tests
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ build-backend = "poetry.core.masonry.api"
venvPath = "."
venv = ".venv"
typeCheckingMode = "off"

[tool.pytest.ini_options]
pythonpath = ["plugins/filter", "plugins/test"]
8 changes: 0 additions & 8 deletions tests/test_filter.py → tests/pytest/test_filter.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import os
import sys

import pytest

sys.path.append(os.path.join(os.path.dirname(sys.path[0]), "plugins", "filter"))

print(sys.path)

from custom_filter import ( # noqa: E402
alias_keys,
dict_to_list,
Expand Down
10 changes: 1 addition & 9 deletions tests/test_test.py → tests/pytest/test_test.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import sys
import os
import pytest

sys.path.append(os.path.join(os.path.dirname(sys.path[0]), "plugins", "test"))

print(sys.path)

from custom_test import (test_network, test_property) # noqa: E402
from custom_test import test_network, test_property # noqa: E402


def test_test_network():
Expand Down

0 comments on commit 4afa991

Please sign in to comment.