dir-content-diff 1.9.1__tar.gz → 1.11.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dir_content_diff-1.11.0/.codespellrc +2 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.copier-answers.yml +1 -1
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/workflows/commitlint.yml +3 -1
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/workflows/run-tox.yml +1 -1
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.pre-commit-config.yaml +6 -8
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.pylintrc +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.readthedocs.yml +2 -2
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/CHANGELOG.md +16 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/CONTRIBUTING.md +1 -1
- {dir_content_diff-1.9.1/dir_content_diff.egg-info → dir_content_diff-1.11.0}/PKG-INFO +2 -2
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/__init__.py +16 -9
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/base_comparators.py +13 -12
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/morphio.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/pandas.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/voxcell.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/pytest_plugin.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/util.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0/dir_content_diff.egg-info}/PKG-INFO +2 -2
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/requires.txt +1 -1
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/conf.py +5 -4
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/setup.py +2 -1
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/comparators/test_morphio.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/comparators/test_pandas.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/comparators/test_voxcell.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/conftest.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/generate_test_files.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/test_base.py +37 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/test_missing_deps.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/test_pytest_plugin.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/test_util.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/test_version.py +1 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tox.ini +4 -2
- dir_content_diff-1.9.1/.codespellrc +0 -2
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.auto-changelog +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.auto-changelog-template.hbs +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.codespellignorelines +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.coveragerc +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.coveragerc_min_versions +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.flake8 +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.gitattributes +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/ISSUE_TEMPLATE/bug_report.yaml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/ISSUE_TEMPLATE/feature_request.yaml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/ISSUE_TEMPLATE/how_to_use.yaml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/dependabot.yml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/pull_request_template.md +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/workflows/publish-sdist.yml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.gitignore +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.gitreview +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/AUTHORS.md +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/LICENSE.txt +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/MANIFEST.in +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/README.md +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/codecov.yml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/commitlint.config.js +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/__init__.py +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/dependencies.json +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/SOURCES.txt +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/dependency_links.txt +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/entry_points.txt +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/top_level.txt +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/Makefile +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/.gitignore +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/api_ref.rst +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/changelog.rst +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/contributing.rst +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/docs/source/index.rst +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/package.json +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/pyproject.toml +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/setup.cfg +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/__init__.py +0 -0
- {dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/tests/comparators/__init__.py +0 -0
|
@@ -8,6 +8,8 @@ jobs:
|
|
|
8
8
|
check-pr-title:
|
|
9
9
|
name: Check PR title
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
|
+
env:
|
|
12
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
11
13
|
steps:
|
|
12
14
|
- uses: actions/checkout@v4
|
|
13
15
|
- uses: actions/setup-node@v4
|
|
@@ -16,4 +18,4 @@ jobs:
|
|
|
16
18
|
- run: npm install -g --force commitlint @commitlint/cli commitlint-plugin-cleanfeet
|
|
17
19
|
- run: npm install conventional-changelog-conventionalcommits
|
|
18
20
|
- run: touch .git/COMMIT_EDITMSG
|
|
19
|
-
- run: echo "$
|
|
21
|
+
- run: echo "$PR_TITLE" | commitlint
|
|
@@ -59,7 +59,7 @@ jobs:
|
|
|
59
59
|
pip install tox
|
|
60
60
|
tox run -e min_versions
|
|
61
61
|
- name: JUnit Report Action
|
|
62
|
-
uses: mikepenz/action-junit-report@
|
|
62
|
+
uses: mikepenz/action-junit-report@v5
|
|
63
63
|
if: always() # always run even if the previous step fails
|
|
64
64
|
with:
|
|
65
65
|
report_paths: 'reports/pytest-*.xml'
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
default_language_version:
|
|
2
|
-
python: python3.10
|
|
3
1
|
repos:
|
|
4
2
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
-
rev:
|
|
3
|
+
rev: v5.0.0
|
|
6
4
|
hooks:
|
|
7
5
|
- id: check-added-large-files
|
|
8
6
|
- id: check-case-conflict
|
|
@@ -13,22 +11,22 @@ repos:
|
|
|
13
11
|
- id: end-of-file-fixer
|
|
14
12
|
- id: trailing-whitespace
|
|
15
13
|
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
|
16
|
-
rev: v9.
|
|
14
|
+
rev: v9.18.0
|
|
17
15
|
hooks:
|
|
18
16
|
- id: commitlint
|
|
19
17
|
stages:
|
|
20
18
|
- commit-msg
|
|
21
19
|
additional_dependencies: ['conventional-changelog-conventionalcommits']
|
|
22
20
|
- repo: https://github.com/pycqa/isort
|
|
23
|
-
rev: 5.
|
|
21
|
+
rev: 5.13.2
|
|
24
22
|
hooks:
|
|
25
23
|
- id: isort
|
|
26
24
|
- repo: https://github.com/psf/black
|
|
27
|
-
rev:
|
|
25
|
+
rev: 24.10.0
|
|
28
26
|
hooks:
|
|
29
27
|
- id: black
|
|
30
28
|
- repo: https://github.com/codespell-project/codespell
|
|
31
|
-
rev: v2.
|
|
29
|
+
rev: v2.3.0
|
|
32
30
|
hooks:
|
|
33
31
|
- id: codespell
|
|
34
32
|
args: ["-x", ".codespellignorelines"]
|
|
@@ -38,6 +36,6 @@ repos:
|
|
|
38
36
|
- id: pydocstyle
|
|
39
37
|
additional_dependencies: ["tomli"]
|
|
40
38
|
- repo: https://github.com/PyCQA/flake8
|
|
41
|
-
rev:
|
|
39
|
+
rev: 7.1.1
|
|
42
40
|
hooks:
|
|
43
41
|
- id: flake8
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.11.0](https://github.com/BlueBrain/dir-content-diff/compare/1.10.0..1.11.0)
|
|
4
|
+
|
|
5
|
+
> 6 November 2024
|
|
6
|
+
|
|
7
|
+
### Build
|
|
8
|
+
|
|
9
|
+
- Drop support for Python 3.8 (dependabot[bot] - [#66](https://github.com/BlueBrain/dir-content-diff/pull/66))
|
|
10
|
+
|
|
11
|
+
## [1.10.0](https://github.com/BlueBrain/dir-content-diff/compare/1.9.1..1.10.0)
|
|
12
|
+
|
|
13
|
+
> 10 September 2024
|
|
14
|
+
|
|
15
|
+
### New Features
|
|
16
|
+
|
|
17
|
+
- Add parameters for load and save methods of base comparators (Adrien Berchet - [#64](https://github.com/BlueBrain/dir-content-diff/pull/64))
|
|
18
|
+
|
|
3
19
|
## [1.9.1](https://github.com/BlueBrain/dir-content-diff/compare/1.9.0..1.9.1)
|
|
4
20
|
|
|
5
21
|
> 29 August 2024
|
|
@@ -59,7 +59,7 @@ When you wish to contribute to the code base, please consider the following guid
|
|
|
59
59
|
or
|
|
60
60
|
|
|
61
61
|
```shell
|
|
62
|
-
tox
|
|
62
|
+
tox run -e py39,lint,docs,check-packaging
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
* Commit your changes using a descriptive commit message.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dir-content-diff
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.11.0
|
|
4
4
|
Summary: Simple tool to compare directory contents.
|
|
5
5
|
Home-page: https://dir-content-diff.readthedocs.io
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -46,7 +46,7 @@ Requires-Dist: rst2pdf>=0.99; extra == "test"
|
|
|
46
46
|
Requires-Dist: packaging>=20; extra == "test"
|
|
47
47
|
Requires-Dist: pandas>=1.4; extra == "test"
|
|
48
48
|
Requires-Dist: pytest>=6.2; extra == "test"
|
|
49
|
-
Requires-Dist: pytest-html
|
|
49
|
+
Requires-Dist: pytest-html>=3.2; extra == "test"
|
|
50
50
|
Provides-Extra: pandas
|
|
51
51
|
Requires-Dist: pandas>=1.4; extra == "pandas"
|
|
52
52
|
Requires-Dist: pyarrow>=11; extra == "pandas"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Simple tool to compare directory contents.
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
import copy
|
|
6
7
|
import importlib.metadata
|
|
7
8
|
import re
|
|
@@ -176,18 +177,22 @@ def export_formatted_file(file, formatted_file, comparator, **kwargs):
|
|
|
176
177
|
file,
|
|
177
178
|
**kwargs.get(
|
|
178
179
|
"load_kwargs",
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
(
|
|
181
|
+
comparator._default_load_kwargs
|
|
182
|
+
if hasattr(comparator, "_default_load_kwargs")
|
|
183
|
+
else {}
|
|
184
|
+
),
|
|
182
185
|
),
|
|
183
186
|
)
|
|
184
187
|
formatted_data = comparator.format_data(
|
|
185
188
|
data,
|
|
186
189
|
**kwargs.get(
|
|
187
190
|
"format_data_kwargs",
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
(
|
|
192
|
+
comparator._default_format_data_kwargs
|
|
193
|
+
if hasattr(comparator, "_default_format_data_kwargs")
|
|
194
|
+
else {}
|
|
195
|
+
),
|
|
191
196
|
),
|
|
192
197
|
)
|
|
193
198
|
Path(formatted_file).parent.mkdir(parents=True, exist_ok=True)
|
|
@@ -196,9 +201,11 @@ def export_formatted_file(file, formatted_file, comparator, **kwargs):
|
|
|
196
201
|
formatted_file,
|
|
197
202
|
**kwargs.get(
|
|
198
203
|
"save_kwargs",
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
204
|
+
(
|
|
205
|
+
comparator._default_save_kwargs
|
|
206
|
+
if hasattr(comparator, "_default_save_kwargs")
|
|
207
|
+
else {}
|
|
208
|
+
),
|
|
202
209
|
),
|
|
203
210
|
)
|
|
204
211
|
else:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Module containing the base comparators."""
|
|
2
|
+
|
|
2
3
|
import configparser
|
|
3
4
|
import filecmp
|
|
4
5
|
import json
|
|
@@ -406,16 +407,16 @@ class JsonComparator(DictComparator):
|
|
|
406
407
|
This comparator is based on the :class:`DictComparator` and uses the same parameters.
|
|
407
408
|
"""
|
|
408
409
|
|
|
409
|
-
def load(self, path):
|
|
410
|
+
def load(self, path, **kwargs):
|
|
410
411
|
"""Open a JSON file."""
|
|
411
412
|
with open(path) as file: # pylint: disable=unspecified-encoding
|
|
412
|
-
data = json.load(file)
|
|
413
|
+
data = json.load(file, **kwargs)
|
|
413
414
|
return data
|
|
414
415
|
|
|
415
|
-
def save(self, data, path):
|
|
416
|
+
def save(self, data, path, **kwargs):
|
|
416
417
|
"""Save formatted data into a JSON file."""
|
|
417
418
|
with open(path, "w", encoding="utf-8") as file:
|
|
418
|
-
json.dump(data, file)
|
|
419
|
+
json.dump(data, file, **kwargs)
|
|
419
420
|
|
|
420
421
|
|
|
421
422
|
class YamlComparator(DictComparator):
|
|
@@ -424,16 +425,16 @@ class YamlComparator(DictComparator):
|
|
|
424
425
|
This comparator is based on the :class:`DictComparator` and uses the same parameters.
|
|
425
426
|
"""
|
|
426
427
|
|
|
427
|
-
def load(self, path):
|
|
428
|
+
def load(self, path, **kwargs):
|
|
428
429
|
"""Open a YAML file."""
|
|
429
430
|
with open(path) as file: # pylint: disable=unspecified-encoding
|
|
430
|
-
data = yaml.full_load(file)
|
|
431
|
+
data = yaml.full_load(file, **kwargs)
|
|
431
432
|
return data
|
|
432
433
|
|
|
433
|
-
def save(self, data, path):
|
|
434
|
+
def save(self, data, path, **kwargs):
|
|
434
435
|
"""Save formatted data into a YAML file."""
|
|
435
436
|
with open(path, "w", encoding="utf-8") as file:
|
|
436
|
-
yaml.dump(data, file)
|
|
437
|
+
yaml.dump(data, file, **kwargs)
|
|
437
438
|
|
|
438
439
|
|
|
439
440
|
class XmlComparator(DictComparator):
|
|
@@ -468,10 +469,10 @@ class XmlComparator(DictComparator):
|
|
|
468
469
|
data = self.xmltodict(file.read())
|
|
469
470
|
return data
|
|
470
471
|
|
|
471
|
-
def save(self, data, path):
|
|
472
|
+
def save(self, data, path, root=False, **kwargs):
|
|
472
473
|
"""Save formatted data into a XML file."""
|
|
473
474
|
with open(path, "w", encoding="utf-8") as file:
|
|
474
|
-
file.write(dicttoxml(data
|
|
475
|
+
file.write(dicttoxml(data, root=root, **kwargs).decode())
|
|
475
476
|
|
|
476
477
|
@staticmethod
|
|
477
478
|
def _cast_from_attribute(text, attr):
|
|
@@ -544,10 +545,10 @@ class IniComparator(DictComparator):
|
|
|
544
545
|
data.read(path)
|
|
545
546
|
return self.configparser_to_dict(data)
|
|
546
547
|
|
|
547
|
-
def save(self, data, path):
|
|
548
|
+
def save(self, data, path, **kwargs):
|
|
548
549
|
"""Save formatted data into a INI file."""
|
|
549
550
|
with open(path, "w", encoding="utf-8") as file:
|
|
550
|
-
self.dict_to_configparser(data).write(file)
|
|
551
|
+
self.dict_to_configparser(data, **kwargs).write(file)
|
|
551
552
|
|
|
552
553
|
@staticmethod
|
|
553
554
|
def configparser_to_dict(config):
|
|
@@ -11,6 +11,7 @@ When this feature is triggered, the files that are processed by a comparator wit
|
|
|
11
11
|
capability will be formatted and exported to a directory whose name is built from the compared
|
|
12
12
|
directory with a suffix added. The default suffix is ``_FORMATTED`` and can be customized.
|
|
13
13
|
"""
|
|
14
|
+
|
|
14
15
|
from dir_content_diff import _DEFAULT_EXPORT_SUFFIX
|
|
15
16
|
from dir_content_diff import assert_equal_trees
|
|
16
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dir-content-diff
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.11.0
|
|
4
4
|
Summary: Simple tool to compare directory contents.
|
|
5
5
|
Home-page: https://dir-content-diff.readthedocs.io
|
|
6
6
|
Author: Blue Brain Project, EPFL
|
|
@@ -46,7 +46,7 @@ Requires-Dist: rst2pdf>=0.99; extra == "test"
|
|
|
46
46
|
Requires-Dist: packaging>=20; extra == "test"
|
|
47
47
|
Requires-Dist: pandas>=1.4; extra == "test"
|
|
48
48
|
Requires-Dist: pytest>=6.2; extra == "test"
|
|
49
|
-
Requires-Dist: pytest-html
|
|
49
|
+
Requires-Dist: pytest-html>=3.2; extra == "test"
|
|
50
50
|
Provides-Extra: pandas
|
|
51
51
|
Requires-Dist: pandas>=1.4; extra == "pandas"
|
|
52
52
|
Requires-Dist: pyarrow>=11; extra == "pandas"
|
|
@@ -14,10 +14,11 @@ from importlib import metadata
|
|
|
14
14
|
|
|
15
15
|
# -- Project information -----------------------------------------------------
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
project_name = "Directory Content Difference"
|
|
18
|
+
package_name = "dir-content-diff"
|
|
18
19
|
|
|
19
20
|
# The short X.Y version
|
|
20
|
-
version = metadata.version(
|
|
21
|
+
version = metadata.version(package_name)
|
|
21
22
|
|
|
22
23
|
# The full version, including alpha/beta/rc tags
|
|
23
24
|
release = version
|
|
@@ -61,10 +62,10 @@ html_theme = "sphinx-bluebrain-theme"
|
|
|
61
62
|
# html_static_path = ['_static']
|
|
62
63
|
|
|
63
64
|
html_theme_options = {
|
|
64
|
-
"metadata_distribution":
|
|
65
|
+
"metadata_distribution": package_name,
|
|
65
66
|
}
|
|
66
67
|
|
|
67
|
-
html_title =
|
|
68
|
+
html_title = project_name
|
|
68
69
|
|
|
69
70
|
# If true, links to the reST sources are added to the pages.
|
|
70
71
|
html_show_sourcelink = False
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Test the base features of the ``dir-content-diff`` package."""
|
|
2
|
+
|
|
2
3
|
# pylint: disable=missing-function-docstring
|
|
3
4
|
# pylint: disable=redefined-outer-name
|
|
4
5
|
# pylint: disable=unused-argument
|
|
@@ -410,9 +411,35 @@ class TestBaseComparator:
|
|
|
410
411
|
assert kwargs_msg in no_report_diff_default
|
|
411
412
|
assert no_report_diff_default.replace(kwargs_msg, "") == diff
|
|
412
413
|
|
|
414
|
+
@staticmethod
|
|
415
|
+
def common_test_load_save(tmp_path, comparator):
|
|
416
|
+
"""Test load and save capabilities of the given comparator."""
|
|
417
|
+
initial_data = {
|
|
418
|
+
"a": {
|
|
419
|
+
"b": 1,
|
|
420
|
+
"c": [1, 2, 3],
|
|
421
|
+
"d": {
|
|
422
|
+
"test_str": "a str",
|
|
423
|
+
"test_int": 999,
|
|
424
|
+
},
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
initial_file = tmp_path / "initial_file.json"
|
|
429
|
+
comparator.save(initial_data, initial_file)
|
|
430
|
+
|
|
431
|
+
loaded_data = comparator.load(initial_file)
|
|
432
|
+
|
|
433
|
+
assert loaded_data == initial_data
|
|
434
|
+
|
|
413
435
|
class TestJsonComparator:
|
|
414
436
|
"""Test the JSON comparator."""
|
|
415
437
|
|
|
438
|
+
def test_load_save(self, tmp_path):
|
|
439
|
+
"""Test load and save capabilities of the comparator."""
|
|
440
|
+
comparator = dir_content_diff.JsonComparator()
|
|
441
|
+
TestBaseComparator.common_test_load_save(tmp_path, comparator)
|
|
442
|
+
|
|
416
443
|
def test_format_data(self):
|
|
417
444
|
"""Test data formatting."""
|
|
418
445
|
data = {
|
|
@@ -490,6 +517,11 @@ class TestBaseComparator:
|
|
|
490
517
|
class TestXmlComparator:
|
|
491
518
|
"""Test the XML comparator."""
|
|
492
519
|
|
|
520
|
+
def test_load_save(self, tmp_path):
|
|
521
|
+
"""Test load and save capabilities of the comparator."""
|
|
522
|
+
comparator = dir_content_diff.XmlComparator()
|
|
523
|
+
TestBaseComparator.common_test_load_save(tmp_path, comparator)
|
|
524
|
+
|
|
493
525
|
def test_xmltodict(self):
|
|
494
526
|
"""Test all types of the xmltodict auto cast feature."""
|
|
495
527
|
comparator = dir_content_diff.XmlComparator()
|
|
@@ -574,6 +606,11 @@ class TestBaseComparator:
|
|
|
574
606
|
class TestIniComparator:
|
|
575
607
|
"""Test the INI comparator."""
|
|
576
608
|
|
|
609
|
+
def test_load_save(self, tmp_path):
|
|
610
|
+
"""Test load and save capabilities of the comparator."""
|
|
611
|
+
comparator = dir_content_diff.IniComparator()
|
|
612
|
+
TestBaseComparator.common_test_load_save(tmp_path, comparator)
|
|
613
|
+
|
|
577
614
|
def test_initodict(self, ref_tree):
|
|
578
615
|
"""Test conversion of INI files into dict."""
|
|
579
616
|
data = configparser.ConfigParser()
|
|
@@ -30,6 +30,8 @@ commands =
|
|
|
30
30
|
--html reports/pytest-{envname}.html \
|
|
31
31
|
--junit-xml=reports/pytest-{envname}.xml \
|
|
32
32
|
--self-contained-html \
|
|
33
|
+
--durations 10 \
|
|
34
|
+
--durations-min=2.0 \
|
|
33
35
|
{posargs}
|
|
34
36
|
coverage html -d reports/coverage-{envname}
|
|
35
37
|
coverage xml -o reports/coverage-{envname}.xml
|
|
@@ -101,6 +103,6 @@ commands = make html SPHINXOPTS=-W
|
|
|
101
103
|
[gh-actions]
|
|
102
104
|
python =
|
|
103
105
|
3.9: py39, lint
|
|
104
|
-
3.10: py310,
|
|
105
|
-
3.11: py311,
|
|
106
|
+
3.10: py310, check-packaging
|
|
107
|
+
3.11: py311, docs
|
|
106
108
|
3.12: py312
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/.github/ISSUE_TEMPLATE/feature_request.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff/comparators/dependencies.json
RENAMED
|
File without changes
|
|
File without changes
|
{dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{dir_content_diff-1.9.1 → dir_content_diff-1.11.0}/dir_content_diff.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|