pytest-arraydiff 0.6.0__tar.gz → 0.6.1__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.
Files changed (31) hide show
  1. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/CHANGES.md +5 -0
  2. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/PKG-INFO +5 -1
  3. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/README.rst +4 -0
  4. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff/plugin.py +4 -2
  5. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff/version.py +2 -2
  6. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/PKG-INFO +5 -1
  7. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/SOURCES.txt +1 -0
  8. pytest-arraydiff-0.6.1/tests/baseline/test_single_reference.fits +0 -0
  9. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/test_pytest_arraydiff.py +22 -0
  10. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tox.ini +2 -1
  11. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/.github/workflows/ci_workflows.yml +0 -0
  12. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/.gitignore +0 -0
  13. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/LICENSE +0 -0
  14. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/MANIFEST.in +0 -0
  15. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pyproject.toml +0 -0
  16. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff/__init__.py +0 -0
  17. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/dependency_links.txt +0 -0
  18. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/entry_points.txt +0 -0
  19. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/not-zip-safe +0 -0
  20. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/requires.txt +0 -0
  21. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/pytest_arraydiff.egg-info/top_level.txt +0 -0
  22. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/setup.cfg +0 -0
  23. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/setup.py +0 -0
  24. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_absolute_tolerance.fits +0 -0
  25. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_relative_tolerance.fits +0 -0
  26. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_class.fits +0 -0
  27. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_func_default.txt +0 -0
  28. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_func_fits.fits +0 -0
  29. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_func_fits_hdu.fits +0 -0
  30. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_func_pdhdf.h5 +0 -0
  31. {pytest-arraydiff-0.6.0 → pytest-arraydiff-0.6.1}/tests/baseline/test_succeeds_func_text.txt +0 -0
@@ -1,3 +1,8 @@
1
+ 0.6.1 (2023-11-27)
2
+ ------------------
3
+
4
+ - Fix broken ``single_reference=True`` usage. [#43]
5
+
1
6
  0.6 (2023-11-15)
2
7
  ----------------
3
8
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-arraydiff
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: pytest plugin to help with comparing array output from tests
5
5
  Home-page: https://github.com/astropy/pytest-arraydiff
6
6
  Author: The Astropy Developers
@@ -41,6 +41,10 @@ Requires-Dist: tables; extra == "test"
41
41
  :target: https://github.com/astropy/pytest-arraydiff/actions
42
42
  :alt: CI Status
43
43
 
44
+ .. image:: https://img.shields.io/pypi/v/pytest-arraydiff.svg
45
+ :target: https://pypi.org/project/pytest-arraydiff
46
+ :alt: PyPI Status
47
+
44
48
  About
45
49
  -----
46
50
 
@@ -6,6 +6,10 @@
6
6
  :target: https://github.com/astropy/pytest-arraydiff/actions
7
7
  :alt: CI Status
8
8
 
9
+ .. image:: https://img.shields.io/pypi/v/pytest-arraydiff.svg
10
+ :target: https://pypi.org/project/pytest-arraydiff
11
+ :alt: PyPI Status
12
+
9
13
  About
10
14
  -----
11
15
 
@@ -310,8 +310,10 @@ class ArrayComparison(object):
310
310
  # Find test name to use as plot name
311
311
  filename = compare.kwargs.get('filename', None)
312
312
  if filename is None:
313
- filename = item.name + '.' + extension
314
- if not single_reference:
313
+ if single_reference:
314
+ filename = item.originalname + '.' + extension
315
+ else:
316
+ filename = item.name + '.' + extension
315
317
  filename = filename.replace('[', '_').replace(']', '_')
316
318
  filename = filename.replace('_.' + extension, '.' + extension)
317
319
 
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.6.0'
16
- __version_tuple__ = version_tuple = (0, 6, 0)
15
+ __version__ = version = '0.6.1'
16
+ __version_tuple__ = version_tuple = (0, 6, 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pytest-arraydiff
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: pytest plugin to help with comparing array output from tests
5
5
  Home-page: https://github.com/astropy/pytest-arraydiff
6
6
  Author: The Astropy Developers
@@ -41,6 +41,10 @@ Requires-Dist: tables; extra == "test"
41
41
  :target: https://github.com/astropy/pytest-arraydiff/actions
42
42
  :alt: CI Status
43
43
 
44
+ .. image:: https://img.shields.io/pypi/v/pytest-arraydiff.svg
45
+ :target: https://pypi.org/project/pytest-arraydiff
46
+ :alt: PyPI Status
47
+
44
48
  About
45
49
  -----
46
50
 
@@ -21,6 +21,7 @@ pytest_arraydiff.egg-info/top_level.txt
21
21
  tests/test_pytest_arraydiff.py
22
22
  tests/baseline/test_absolute_tolerance.fits
23
23
  tests/baseline/test_relative_tolerance.fits
24
+ tests/baseline/test_single_reference.fits
24
25
  tests/baseline/test_succeeds_class.fits
25
26
  tests/baseline/test_succeeds_func_default.txt
26
27
  tests/baseline/test_succeeds_func_fits.fits
@@ -152,5 +152,27 @@ def test_absolute_tolerance():
152
152
  return np.ones((3, 4)) * 1.6 + 1.4
153
153
 
154
154
 
155
+ @pytest.mark.array_compare(
156
+ reference_dir=reference_dir,
157
+ atol=1.5,
158
+ file_format='fits',
159
+ single_reference=True)
160
+ @pytest.mark.parametrize('spam', ('egg', 'bacon'))
161
+ def test_single_reference(spam):
162
+ return np.ones((3, 4)) * 1.6 + 1.4
163
+
164
+
165
+ class TestSingleReferenceClass:
166
+
167
+ @pytest.mark.array_compare(
168
+ reference_dir=reference_dir,
169
+ atol=1.5,
170
+ file_format='fits',
171
+ single_reference=True)
172
+ @pytest.mark.parametrize('spam', ('egg', 'bacon'))
173
+ def test_single_reference(self, spam):
174
+ return np.ones((3, 4)) * 1.6 + 1.4
175
+
176
+
155
177
  def test_nofile():
156
178
  pass
@@ -10,7 +10,7 @@ isolated_build = true
10
10
  [testenv]
11
11
  changedir = .tmp/{envname}
12
12
  setenv =
13
- devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
13
+ devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
14
14
  description = run tests
15
15
  deps =
16
16
  pytestoldest: pytest==4.6.0
@@ -28,6 +28,7 @@ deps =
28
28
  devdeps: git+https://github.com/pytest-dev/pytest#egg=pytest
29
29
  devdeps: numpy>=0.0.dev0
30
30
  devdeps: pandas>=0.0.dev0
31
+ devdeps: pyerfa>=0.0.dev0
31
32
  devdeps: astropy>=0.0.dev0
32
33
  extras =
33
34
  test