Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.1.2: test suite is using nose #25

Open
kloczek opened this issue Aug 24, 2021 · 2 comments
Open

1.1.2: test suite is using nose #25

kloczek opened this issue Aug 24, 2021 · 2 comments

Comments

@kloczek
Copy link

kloczek commented Aug 24, 2021

Just forced to use pytaes on colorspacious

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-colorspacious-1.1.2~no_loopy_deps-14.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-colorspacious-1.1.2~no_loopy_deps-14.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra colorspacious/__init__.py colorspacious/basics.py colorspacious/ciecam02.py colorspacious/comparison.py colorspacious/conversion.py colorspacious/cvd.py colorspacious/gold_values.py colorspacious/illuminants.py colorspacious/luoetal2006.py colorspacious/testing.py colorspacious/transform_graph.py colorspacious/util.py colorspacious/version.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.11, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3161179999
rootdir: /home/tkloczko/rpmbuild/BUILD/colorspacious-1.1.2
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, httpbin-1.0.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1
collected 38 items

colorspacious/comparison.py .                                                                                                                                        [  2%]
colorspacious/ciecam02.py .F.FF.                                                                                                                                     [ 18%]
colorspacious/transform_graph.py .......FF.FF                                                                                                                        [ 50%]
colorspacious/util.py ...                                                                                                                                            [ 57%]
colorspacious/conversion.py ..FF                                                                                                                                     [ 68%]
colorspacious/illuminants.py FF                                                                                                                                      [ 73%]
colorspacious/basics.py ........                                                                                                                                     [ 84%]
colorspacious/luoetal2006.py .                                                                                                                                       [ 86%]
colorspacious/cvd.py .

================================================================================= FAILURES =================================================================================
_____________________________________________________________________________ test_exactly_one _____________________________________________________________________________

    def test_exactly_one():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/ciecam02.py:496: ModuleNotFoundError
____________________________________________________________________________ test_on_negative_A ____________________________________________________________________________

    def test_on_negative_A():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/ciecam02.py:524: ModuleNotFoundError
________________________________________________________________________________ test_misc _________________________________________________________________________________

    def test_misc():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/ciecam02.py:475: ModuleNotFoundError
_____________________________________________________________________________ test_check_node ______________________________________________________________________________

    def test_check_node():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/transform_graph.py:49: ModuleNotFoundError
_____________________________________________________________________________ test_check_path ______________________________________________________________________________

    def test_check_path():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/transform_graph.py:132: ModuleNotFoundError
_____________________________________________________________________________ test_check_edge ______________________________________________________________________________

    def test_check_edge():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/transform_graph.py:95: ModuleNotFoundError
__________________________________________________________________________ test_transform_kwargs ___________________________________________________________________________

    def test_transform_kwargs():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/transform_graph.py:512: ModuleNotFoundError
____________________________________________________________________________ test_name_aliases _____________________________________________________________________________

    def test_name_aliases():
        # "CAM02-UCS" is not a primitive name, but rather an alias
        # nonetheless it should be accepted as a "name" key, with any extra fields
        # provided overriding the defaults
        from .gold_values import JMh_to_CAM02UCS_silver
        check_cspace_convert("JMh", "CAM02-UCS", JMh_to_CAM02UCS_silver,
                             a_max=[100, 100, 360],
                             b_min=[0, -30, -30], b_max=[100, 30, 30])
        check_cspace_convert("JMh", {"name": "CAM02-UCS"},
                             JMh_to_CAM02UCS_silver,
                             a_max=[100, 100, 360],
                             b_min=[0, -30, -30], b_max=[100, 30, 30])

        weird_space = CIECAM02Space("D65", 25, 30)
        assert np.allclose(
            cspace_convert([0.1, 0.2, 0.3],
                           "sRGB1",
                           {"name": "CAM02-UCS",
                            "ciecam02_space": weird_space}),
            cspace_convert([0.1, 0.2, 0.3],
                           "sRGB1",
                           {"name": "J'a'b'",
                            "ciecam02_space": weird_space,
                            "luoetal2006_space": CAM02UCS}))

>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/conversion.py:402: ModuleNotFoundError
___________________________________________________________________ test_CIECAM02_subset_error_checking ____________________________________________________________________

    def test_CIECAM02_subset_error_checking():
>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/conversion.py:373: ModuleNotFoundError
_____________________________________________________________________ test_standard_illuminant_XYZ100 ______________________________________________________________________

    def test_standard_illuminant_XYZ100():
        assert np.allclose(
            standard_illuminant_XYZ100("D65"),
            [ 95.047, 100, 108.883])

        assert np.allclose(
            standard_illuminant_XYZ100("D65", observer="CIE 1964 10 deg"),
            [ 94.811, 100, 107.304])

>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/illuminants.py:92: ModuleNotFoundError
_____________________________________________________________________________ test_as_XYZ100_w _____________________________________________________________________________

    def test_as_XYZ100_w():
        assert np.allclose(as_XYZ100_w("D65"), [ 95.047, 100, 108.883])
        assert np.allclose(as_XYZ100_w([1, 2, 3]), [1, 2, 3])
        assert as_XYZ100_w([1, 2, 3]).dtype == float

>       from nose.tools import assert_raises
E       ModuleNotFoundError: No module named 'nose'

colorspacious/illuminants.py:123: ModuleNotFoundError
============================================================================= warnings summary =============================================================================
colorspacious/comparison.py:11
  /home/tkloczko/rpmbuild/BUILD/colorspacious-1.1.2/colorspacious/comparison.py:11: DeprecationWarning: invalid escape sequence \D
    """Computes the :math:`\Delta E` distance between pairs of colors.

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
FAILED colorspacious/ciecam02.py::test_exactly_one - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/ciecam02.py::test_on_negative_A - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/ciecam02.py::test_misc - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/transform_graph.py::test_check_node - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/transform_graph.py::test_check_path - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/transform_graph.py::test_check_edge - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/transform_graph.py::test_transform_kwargs - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/conversion.py::test_name_aliases - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/conversion.py::test_CIECAM02_subset_error_checking - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/illuminants.py::test_standard_illuminant_XYZ100 - ModuleNotFoundError: No module named 'nose'
FAILED colorspacious/illuminants.py::test_as_XYZ100_w - ModuleNotFoundError: No module named 'nose'
================================================================= 11 failed, 27 passed, 1 warning in 2.50s =================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.

`nose is no longer maintained and shpuld be not used with python 3.x https://nose.readthedocs.io/en/latest/

@emollier
Copy link

Hi,

While working on the colorspacious package in Debian, I devised a port to pytest, since nose is deprecated. The patch is available on salsa. I did not prepare a merge request because it's a bit unclear to me how to adjust Travis.

HTH,
Étienne.

@kloczek
Copy link
Author

kloczek commented Mar 19, 2024

Thank you to let me know about that patch👍 😄
Wil try to test that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants