From ee2728c8216eac3cbc17423475e62e5f62da1773 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Pronovici" Date: Mon, 25 Aug 2025 04:40:57 -0500 Subject: [PATCH] Move tests into src/tests/uciparse --- .run/commands/pylint.sh | 43 +++++++++++-------- .run/commands/pytest.sh | 15 +++++-- .run/tasks/test.sh | 6 +-- .tabignore | 22 +++++----- Changelog | 1 + DEVELOPER.md | 6 +-- pyproject.toml | 4 +- .../real/ubootenv => src/tests/__init__.py | 0 src/tests/uciparse/__init__.py | 0 .../fixtures/test_uci/invalid/config-empty | 0 .../fixtures/test_uci/invalid/config-quotes1 | 0 .../fixtures/test_uci/invalid/config-quotes2 | 0 .../fixtures/test_uci/invalid/list-empty | 0 .../fixtures/test_uci/invalid/list-quotes1 | 0 .../fixtures/test_uci/invalid/list-quotes2 | 0 .../fixtures/test_uci/invalid/option-empty | 0 .../fixtures/test_uci/invalid/option-quotes1 | 0 .../fixtures/test_uci/invalid/option-quotes2 | 0 .../fixtures/test_uci/invalid/package-empty | 0 .../fixtures/test_uci/invalid/package-quotes | 0 .../fixtures/test_uci/invalid/unknown-line | 0 .../fixtures/test_uci/normalized/comments | 0 .../fixtures/test_uci/normalized/config-only | 0 .../fixtures/test_uci/normalized/double-quote | 0 .../test_uci/normalized/list-empty-value | 0 .../fixtures/test_uci/normalized/list-only | 0 .../test_uci/normalized/no-config-name | 0 .../fixtures/test_uci/normalized/no-quote | 0 .../test_uci/normalized/option-empty-value | 0 .../fixtures/test_uci/normalized/option-only | 0 .../fixtures/test_uci/normalized/package-only | 0 .../fixtures/test_uci/normalized/single-quote | 0 .../fixtures/test_uci/original/comments | 0 .../fixtures/test_uci/original/config-only | 0 .../fixtures/test_uci/original/double-quote | 0 .../test_uci/original/list-empty-value | 0 .../fixtures/test_uci/original/list-only | 0 .../fixtures/test_uci/original/no-config-name | 0 .../fixtures/test_uci/original/no-quote | 0 .../test_uci/original/option-empty-value | 0 .../fixtures/test_uci/original/option-only | 0 .../fixtures/test_uci/original/package-only | 0 .../fixtures/test_uci/original/single-quote | 0 .../fixtures/test_uci/real/README.md | 0 .../uciparse}/fixtures/test_uci/real/dhcp | 0 .../uciparse}/fixtures/test_uci/real/dropbear | 0 .../uciparse}/fixtures/test_uci/real/firewall | 0 .../uciparse}/fixtures/test_uci/real/luci | 0 .../uciparse}/fixtures/test_uci/real/network | 0 .../uciparse}/fixtures/test_uci/real/p910nd | 0 .../uciparse}/fixtures/test_uci/real/rpcd | 0 .../uciparse}/fixtures/test_uci/real/system | 0 .../uciparse/fixtures/test_uci/real/ubootenv | 0 .../uciparse}/fixtures/test_uci/real/ucitrack | 0 .../uciparse}/fixtures/test_uci/real/uhttpd | 0 .../uciparse}/fixtures/test_uci/real/wireless | 0 {tests => src/tests/uciparse}/test_cli.py | 0 {tests => src/tests/uciparse}/test_uci.py | 0 tests/__init__.py | 1 - 59 files changed, 55 insertions(+), 43 deletions(-) rename tests/fixtures/test_uci/real/ubootenv => src/tests/__init__.py (100%) create mode 100644 src/tests/uciparse/__init__.py rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/config-empty (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/config-quotes1 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/config-quotes2 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/list-empty (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/list-quotes1 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/list-quotes2 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/option-empty (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/option-quotes1 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/option-quotes2 (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/package-empty (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/package-quotes (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/invalid/unknown-line (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/comments (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/config-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/double-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/list-empty-value (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/list-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/no-config-name (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/no-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/option-empty-value (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/option-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/package-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/normalized/single-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/comments (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/config-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/double-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/list-empty-value (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/list-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/no-config-name (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/no-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/option-empty-value (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/option-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/package-only (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/original/single-quote (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/README.md (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/dhcp (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/dropbear (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/firewall (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/luci (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/network (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/p910nd (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/rpcd (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/system (100%) create mode 100644 src/tests/uciparse/fixtures/test_uci/real/ubootenv rename {tests => src/tests/uciparse}/fixtures/test_uci/real/ucitrack (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/uhttpd (100%) rename {tests => src/tests/uciparse}/fixtures/test_uci/real/wireless (100%) rename {tests => src/tests/uciparse}/test_cli.py (100%) rename {tests => src/tests/uciparse}/test_uci.py (100%) delete mode 100644 tests/__init__.py diff --git a/.run/commands/pylint.sh b/.run/commands/pylint.sh index f5f84e2..57a9d13 100644 --- a/.run/commands/pylint.sh +++ b/.run/commands/pylint.sh @@ -4,30 +4,35 @@ # We generate relative paths in the output to make integration with Pycharm work better command_pylint() { + local OPTIND OPTARG option tests template + echo "Running pylint checks..." - tests="" + template="{path}:{line}:{column} - {C} - ({symbol}) - {msg}" + if [ -f "tests/__init__.py" ]; then - local OPTIND OPTARG option tests template - - tests="tests" - template="{path}:{line}:{column} - {C} - ({symbol}) - {msg}" - - while getopts "t" option; do - case $option in - t) - tests="" # -t means to ignore the tests - ;; - ?) - echo "invalid option -$OPTARG" - exit 1 - ;; - esac - done - - shift $((OPTIND -1)) # pop off the options consumed by getopts + tests="tests" + elif [ -f "src/tests/__init__.py" ]; then + tests="src/tests" + else + tests="" fi + while getopts "t" option; do + case $option in + t) + echo "Tests will be ignored" + tests="" # -t means to ignore the tests + ;; + ?) + echo "invalid option -$OPTARG" + exit 1 + ;; + esac + done + + shift $((OPTIND -1)) # pop off the options consumed by getopts + poetry_run pylint --msg-template="$template" -j 0 "$@" $(ls -d src/*) $tests echo "done" } diff --git a/.run/commands/pytest.sh b/.run/commands/pytest.sh index ec78a94..e563702 100644 --- a/.run/commands/pytest.sh +++ b/.run/commands/pytest.sh @@ -2,7 +2,16 @@ # Run the pytest unit tests, optionally with coverage command_pytest() { - local OPTIND OPTARG option coverage html color + local OPTIND OPTARG option tests coverage html color + + if [ -f "tests/__init__.py" ]; then + tests="tests" + elif [ -f "src/tests/__init__.py" ]; then + tests="src/tests" + else + echo "No tests found" + exit 0 + fi coverage="no" html="no" @@ -30,7 +39,7 @@ command_pytest() { fi if [ $coverage == "yes" ]; then - poetry_run coverage run -m pytest --testdox --force-testdox $color tests + poetry_run coverage run -m pytest --testdox --force-testdox $color $tests poetry_run coverage report poetry_run coverage lcov -o .coverage.lcov if [ $html == "yes" ]; then @@ -38,7 +47,7 @@ command_pytest() { run_command openfile .htmlcov/index.html fi else - poetry_run pytest --testdox --force-testdox $color tests + poetry_run pytest --testdox --force-testdox $color $tests fi } diff --git a/.run/tasks/test.sh b/.run/tasks/test.sh index 8530c59..2f09b99 100644 --- a/.run/tasks/test.sh +++ b/.run/tasks/test.sh @@ -1,7 +1,7 @@ # vim: set ft=bash sw=3 ts=3 expandtab: help_test() { - if [ -f "tests/__init__.py" ]; then + if [ -f "tests/__init__.py" ] || [ -f "src/tests/__init__.py" ]; then echo "- run test: Run the unit tests" echo "- run test -c: Run the unit tests with coverage" echo "- run test -ch: Run the unit tests with coverage and open the HTML report" @@ -9,8 +9,6 @@ help_test() { } task_test() { - if [ -f "tests/__init__.py" ]; then - run_command pytest "$@" - fi + run_command pytest "$@" } diff --git a/.tabignore b/.tabignore index 0b704a8..a4407f6 100644 --- a/.tabignore +++ b/.tabignore @@ -1,14 +1,14 @@ Changelog docs/Makefile docs/make.bat -tests/fixtures/test_uci/real/dhcp -tests/fixtures/test_uci/real/dropbear -tests/fixtures/test_uci/real/firewall -tests/fixtures/test_uci/real/luci -tests/fixtures/test_uci/real/network -tests/fixtures/test_uci/real/p910nd -tests/fixtures/test_uci/real/rpcd -tests/fixtures/test_uci/real/system -tests/fixtures/test_uci/real/ucitrack -tests/fixtures/test_uci/real/uhttpd -tests/fixtures/test_uci/real/wireless +src/tests/uciparse/fixtures/test_uci/real/dhcp +src/tests/uciparse/fixtures/test_uci/real/dropbear +src/tests/uciparse/fixtures/test_uci/real/firewall +src/tests/uciparse/fixtures/test_uci/real/luci +src/tests/uciparse/fixtures/test_uci/real/network +src/tests/uciparse/fixtures/test_uci/real/p910nd +src/tests/uciparse/fixtures/test_uci/real/rpcd +src/tests/uciparse/fixtures/test_uci/real/system +src/tests/uciparse/fixtures/test_uci/real/ucitrack +src/tests/uciparse/fixtures/test_uci/real/uhttpd +src/tests/uciparse/fixtures/test_uci/real/wireless diff --git a/Changelog b/Changelog index 57e2a71..5639d98 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ Version 0.1.27 unreleased * Add Sphinx configuration path to .readthedocs.yml. * Adjust GHA build process to allow builds for stacked PRs. * Add a new `run clean` target to clean up generated data. + * Move unit tests from `tests` into `src/tests/uciparse`. * Update the jinja2 transitive dependency to address CVE-2025-27516. * Update the requests transitive dependency to address CVE-2024-47081. * Update the urllib3 transitive dependency to address CVE-2025-50181. diff --git a/DEVELOPER.md b/DEVELOPER.md index 54bc11a..1cd4184 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -183,8 +183,8 @@ environment. ### Project Structure Go to the PyCharm settings and find the `uci-parse` project. Under -**Project Structure**, mark both `src` and `tests` as source folders. In -the **Exclude Files** box, enter the following: +**Project Structure**, mark `src` as a source folder and `tests` as a test +folder. In the **Exclude Files** box, enter the following: ``` LICENSE;NOTICE;PyPI.md;build;dist;docs/_build;out;poetry.lock;poetry.toml;run;.coverage;.coverage.lcov;.coveragerc;.gitattributes;.github;.gitignore;.htmlcov;.idea;.mypy_cache;.poetry;.pre-commit-config.yaml;.pylintrc;.pytest_cache;.python-version;.readthedocs.yml;.run;.tabignore;.venv @@ -208,7 +208,7 @@ select _pytest_. Under **Docstrings > Docstring format**, select _Google_. ### Running Unit Tests -Right click on the `tests` folder in the project explorer and choose **Run +Right click on the `src/tests` folder in the project explorer and choose **Run 'pytest in tests'**. Make sure that all of the tests pass. If you see a slightly different option (i.e. for "Unittest" instead of "pytest") then you probably skipped the preferences setup discussed above. You may need to remove the diff --git a/pyproject.toml b/pyproject.toml index c183dec..89499e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ include = [ { path='LICENSE', format='sdist' }, { path='README.md', format='sdist' }, { path='docs', format='sdist' }, - { path='tests', format='sdist' }, + { path='src/tests', format='sdist' }, { path='scripts', format='sdist' }, ] classifiers = [ @@ -115,7 +115,7 @@ pretty = true show_absolute_path = true show_column_numbers = true show_error_codes = true -files = [ "src/uciparse", "tests" ] +files = [ "src" ] check_untyped_defs = true disallow_any_generics = true disallow_incomplete_defs = true diff --git a/tests/fixtures/test_uci/real/ubootenv b/src/tests/__init__.py similarity index 100% rename from tests/fixtures/test_uci/real/ubootenv rename to src/tests/__init__.py diff --git a/src/tests/uciparse/__init__.py b/src/tests/uciparse/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/test_uci/invalid/config-empty b/src/tests/uciparse/fixtures/test_uci/invalid/config-empty similarity index 100% rename from tests/fixtures/test_uci/invalid/config-empty rename to src/tests/uciparse/fixtures/test_uci/invalid/config-empty diff --git a/tests/fixtures/test_uci/invalid/config-quotes1 b/src/tests/uciparse/fixtures/test_uci/invalid/config-quotes1 similarity index 100% rename from tests/fixtures/test_uci/invalid/config-quotes1 rename to src/tests/uciparse/fixtures/test_uci/invalid/config-quotes1 diff --git a/tests/fixtures/test_uci/invalid/config-quotes2 b/src/tests/uciparse/fixtures/test_uci/invalid/config-quotes2 similarity index 100% rename from tests/fixtures/test_uci/invalid/config-quotes2 rename to src/tests/uciparse/fixtures/test_uci/invalid/config-quotes2 diff --git a/tests/fixtures/test_uci/invalid/list-empty b/src/tests/uciparse/fixtures/test_uci/invalid/list-empty similarity index 100% rename from tests/fixtures/test_uci/invalid/list-empty rename to src/tests/uciparse/fixtures/test_uci/invalid/list-empty diff --git a/tests/fixtures/test_uci/invalid/list-quotes1 b/src/tests/uciparse/fixtures/test_uci/invalid/list-quotes1 similarity index 100% rename from tests/fixtures/test_uci/invalid/list-quotes1 rename to src/tests/uciparse/fixtures/test_uci/invalid/list-quotes1 diff --git a/tests/fixtures/test_uci/invalid/list-quotes2 b/src/tests/uciparse/fixtures/test_uci/invalid/list-quotes2 similarity index 100% rename from tests/fixtures/test_uci/invalid/list-quotes2 rename to src/tests/uciparse/fixtures/test_uci/invalid/list-quotes2 diff --git a/tests/fixtures/test_uci/invalid/option-empty b/src/tests/uciparse/fixtures/test_uci/invalid/option-empty similarity index 100% rename from tests/fixtures/test_uci/invalid/option-empty rename to src/tests/uciparse/fixtures/test_uci/invalid/option-empty diff --git a/tests/fixtures/test_uci/invalid/option-quotes1 b/src/tests/uciparse/fixtures/test_uci/invalid/option-quotes1 similarity index 100% rename from tests/fixtures/test_uci/invalid/option-quotes1 rename to src/tests/uciparse/fixtures/test_uci/invalid/option-quotes1 diff --git a/tests/fixtures/test_uci/invalid/option-quotes2 b/src/tests/uciparse/fixtures/test_uci/invalid/option-quotes2 similarity index 100% rename from tests/fixtures/test_uci/invalid/option-quotes2 rename to src/tests/uciparse/fixtures/test_uci/invalid/option-quotes2 diff --git a/tests/fixtures/test_uci/invalid/package-empty b/src/tests/uciparse/fixtures/test_uci/invalid/package-empty similarity index 100% rename from tests/fixtures/test_uci/invalid/package-empty rename to src/tests/uciparse/fixtures/test_uci/invalid/package-empty diff --git a/tests/fixtures/test_uci/invalid/package-quotes b/src/tests/uciparse/fixtures/test_uci/invalid/package-quotes similarity index 100% rename from tests/fixtures/test_uci/invalid/package-quotes rename to src/tests/uciparse/fixtures/test_uci/invalid/package-quotes diff --git a/tests/fixtures/test_uci/invalid/unknown-line b/src/tests/uciparse/fixtures/test_uci/invalid/unknown-line similarity index 100% rename from tests/fixtures/test_uci/invalid/unknown-line rename to src/tests/uciparse/fixtures/test_uci/invalid/unknown-line diff --git a/tests/fixtures/test_uci/normalized/comments b/src/tests/uciparse/fixtures/test_uci/normalized/comments similarity index 100% rename from tests/fixtures/test_uci/normalized/comments rename to src/tests/uciparse/fixtures/test_uci/normalized/comments diff --git a/tests/fixtures/test_uci/normalized/config-only b/src/tests/uciparse/fixtures/test_uci/normalized/config-only similarity index 100% rename from tests/fixtures/test_uci/normalized/config-only rename to src/tests/uciparse/fixtures/test_uci/normalized/config-only diff --git a/tests/fixtures/test_uci/normalized/double-quote b/src/tests/uciparse/fixtures/test_uci/normalized/double-quote similarity index 100% rename from tests/fixtures/test_uci/normalized/double-quote rename to src/tests/uciparse/fixtures/test_uci/normalized/double-quote diff --git a/tests/fixtures/test_uci/normalized/list-empty-value b/src/tests/uciparse/fixtures/test_uci/normalized/list-empty-value similarity index 100% rename from tests/fixtures/test_uci/normalized/list-empty-value rename to src/tests/uciparse/fixtures/test_uci/normalized/list-empty-value diff --git a/tests/fixtures/test_uci/normalized/list-only b/src/tests/uciparse/fixtures/test_uci/normalized/list-only similarity index 100% rename from tests/fixtures/test_uci/normalized/list-only rename to src/tests/uciparse/fixtures/test_uci/normalized/list-only diff --git a/tests/fixtures/test_uci/normalized/no-config-name b/src/tests/uciparse/fixtures/test_uci/normalized/no-config-name similarity index 100% rename from tests/fixtures/test_uci/normalized/no-config-name rename to src/tests/uciparse/fixtures/test_uci/normalized/no-config-name diff --git a/tests/fixtures/test_uci/normalized/no-quote b/src/tests/uciparse/fixtures/test_uci/normalized/no-quote similarity index 100% rename from tests/fixtures/test_uci/normalized/no-quote rename to src/tests/uciparse/fixtures/test_uci/normalized/no-quote diff --git a/tests/fixtures/test_uci/normalized/option-empty-value b/src/tests/uciparse/fixtures/test_uci/normalized/option-empty-value similarity index 100% rename from tests/fixtures/test_uci/normalized/option-empty-value rename to src/tests/uciparse/fixtures/test_uci/normalized/option-empty-value diff --git a/tests/fixtures/test_uci/normalized/option-only b/src/tests/uciparse/fixtures/test_uci/normalized/option-only similarity index 100% rename from tests/fixtures/test_uci/normalized/option-only rename to src/tests/uciparse/fixtures/test_uci/normalized/option-only diff --git a/tests/fixtures/test_uci/normalized/package-only b/src/tests/uciparse/fixtures/test_uci/normalized/package-only similarity index 100% rename from tests/fixtures/test_uci/normalized/package-only rename to src/tests/uciparse/fixtures/test_uci/normalized/package-only diff --git a/tests/fixtures/test_uci/normalized/single-quote b/src/tests/uciparse/fixtures/test_uci/normalized/single-quote similarity index 100% rename from tests/fixtures/test_uci/normalized/single-quote rename to src/tests/uciparse/fixtures/test_uci/normalized/single-quote diff --git a/tests/fixtures/test_uci/original/comments b/src/tests/uciparse/fixtures/test_uci/original/comments similarity index 100% rename from tests/fixtures/test_uci/original/comments rename to src/tests/uciparse/fixtures/test_uci/original/comments diff --git a/tests/fixtures/test_uci/original/config-only b/src/tests/uciparse/fixtures/test_uci/original/config-only similarity index 100% rename from tests/fixtures/test_uci/original/config-only rename to src/tests/uciparse/fixtures/test_uci/original/config-only diff --git a/tests/fixtures/test_uci/original/double-quote b/src/tests/uciparse/fixtures/test_uci/original/double-quote similarity index 100% rename from tests/fixtures/test_uci/original/double-quote rename to src/tests/uciparse/fixtures/test_uci/original/double-quote diff --git a/tests/fixtures/test_uci/original/list-empty-value b/src/tests/uciparse/fixtures/test_uci/original/list-empty-value similarity index 100% rename from tests/fixtures/test_uci/original/list-empty-value rename to src/tests/uciparse/fixtures/test_uci/original/list-empty-value diff --git a/tests/fixtures/test_uci/original/list-only b/src/tests/uciparse/fixtures/test_uci/original/list-only similarity index 100% rename from tests/fixtures/test_uci/original/list-only rename to src/tests/uciparse/fixtures/test_uci/original/list-only diff --git a/tests/fixtures/test_uci/original/no-config-name b/src/tests/uciparse/fixtures/test_uci/original/no-config-name similarity index 100% rename from tests/fixtures/test_uci/original/no-config-name rename to src/tests/uciparse/fixtures/test_uci/original/no-config-name diff --git a/tests/fixtures/test_uci/original/no-quote b/src/tests/uciparse/fixtures/test_uci/original/no-quote similarity index 100% rename from tests/fixtures/test_uci/original/no-quote rename to src/tests/uciparse/fixtures/test_uci/original/no-quote diff --git a/tests/fixtures/test_uci/original/option-empty-value b/src/tests/uciparse/fixtures/test_uci/original/option-empty-value similarity index 100% rename from tests/fixtures/test_uci/original/option-empty-value rename to src/tests/uciparse/fixtures/test_uci/original/option-empty-value diff --git a/tests/fixtures/test_uci/original/option-only b/src/tests/uciparse/fixtures/test_uci/original/option-only similarity index 100% rename from tests/fixtures/test_uci/original/option-only rename to src/tests/uciparse/fixtures/test_uci/original/option-only diff --git a/tests/fixtures/test_uci/original/package-only b/src/tests/uciparse/fixtures/test_uci/original/package-only similarity index 100% rename from tests/fixtures/test_uci/original/package-only rename to src/tests/uciparse/fixtures/test_uci/original/package-only diff --git a/tests/fixtures/test_uci/original/single-quote b/src/tests/uciparse/fixtures/test_uci/original/single-quote similarity index 100% rename from tests/fixtures/test_uci/original/single-quote rename to src/tests/uciparse/fixtures/test_uci/original/single-quote diff --git a/tests/fixtures/test_uci/real/README.md b/src/tests/uciparse/fixtures/test_uci/real/README.md similarity index 100% rename from tests/fixtures/test_uci/real/README.md rename to src/tests/uciparse/fixtures/test_uci/real/README.md diff --git a/tests/fixtures/test_uci/real/dhcp b/src/tests/uciparse/fixtures/test_uci/real/dhcp similarity index 100% rename from tests/fixtures/test_uci/real/dhcp rename to src/tests/uciparse/fixtures/test_uci/real/dhcp diff --git a/tests/fixtures/test_uci/real/dropbear b/src/tests/uciparse/fixtures/test_uci/real/dropbear similarity index 100% rename from tests/fixtures/test_uci/real/dropbear rename to src/tests/uciparse/fixtures/test_uci/real/dropbear diff --git a/tests/fixtures/test_uci/real/firewall b/src/tests/uciparse/fixtures/test_uci/real/firewall similarity index 100% rename from tests/fixtures/test_uci/real/firewall rename to src/tests/uciparse/fixtures/test_uci/real/firewall diff --git a/tests/fixtures/test_uci/real/luci b/src/tests/uciparse/fixtures/test_uci/real/luci similarity index 100% rename from tests/fixtures/test_uci/real/luci rename to src/tests/uciparse/fixtures/test_uci/real/luci diff --git a/tests/fixtures/test_uci/real/network b/src/tests/uciparse/fixtures/test_uci/real/network similarity index 100% rename from tests/fixtures/test_uci/real/network rename to src/tests/uciparse/fixtures/test_uci/real/network diff --git a/tests/fixtures/test_uci/real/p910nd b/src/tests/uciparse/fixtures/test_uci/real/p910nd similarity index 100% rename from tests/fixtures/test_uci/real/p910nd rename to src/tests/uciparse/fixtures/test_uci/real/p910nd diff --git a/tests/fixtures/test_uci/real/rpcd b/src/tests/uciparse/fixtures/test_uci/real/rpcd similarity index 100% rename from tests/fixtures/test_uci/real/rpcd rename to src/tests/uciparse/fixtures/test_uci/real/rpcd diff --git a/tests/fixtures/test_uci/real/system b/src/tests/uciparse/fixtures/test_uci/real/system similarity index 100% rename from tests/fixtures/test_uci/real/system rename to src/tests/uciparse/fixtures/test_uci/real/system diff --git a/src/tests/uciparse/fixtures/test_uci/real/ubootenv b/src/tests/uciparse/fixtures/test_uci/real/ubootenv new file mode 100644 index 0000000..e69de29 diff --git a/tests/fixtures/test_uci/real/ucitrack b/src/tests/uciparse/fixtures/test_uci/real/ucitrack similarity index 100% rename from tests/fixtures/test_uci/real/ucitrack rename to src/tests/uciparse/fixtures/test_uci/real/ucitrack diff --git a/tests/fixtures/test_uci/real/uhttpd b/src/tests/uciparse/fixtures/test_uci/real/uhttpd similarity index 100% rename from tests/fixtures/test_uci/real/uhttpd rename to src/tests/uciparse/fixtures/test_uci/real/uhttpd diff --git a/tests/fixtures/test_uci/real/wireless b/src/tests/uciparse/fixtures/test_uci/real/wireless similarity index 100% rename from tests/fixtures/test_uci/real/wireless rename to src/tests/uciparse/fixtures/test_uci/real/wireless diff --git a/tests/test_cli.py b/src/tests/uciparse/test_cli.py similarity index 100% rename from tests/test_cli.py rename to src/tests/uciparse/test_cli.py diff --git a/tests/test_uci.py b/src/tests/uciparse/test_uci.py similarity index 100% rename from tests/test_uci.py rename to src/tests/uciparse/test_uci.py diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index 82ee591..0000000 --- a/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = [] # type: ignore