Describe the bug
The tests failed with 0.6.1 release.
To Reproduce
Steps to reproduce the behavior:
python setup.py build
PYTHONPATH=build/lib pytest -v
Expected behavior
pass all tests
Additional context
error log:
=================================== FAILURES ===================================
_____________________ test_contains[file_mixed_ext x File] _____________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: file_mixed_ext, dtype: object
type = File, member = True
@pytest.mark.parametrize(**get_contains_cases(series, contains_map, typeset))
def test_contains(series, type, member):
"""Test the generated combinations for "series in type"
Args:
series: the series to test
type: the type to test against
member: the result
"""
result, message = contains(series, type, member)
> assert result, message
E AssertionError: file_mixed_ext in File; expected True, got False
E assert False
tests/typesets/test_complete_set.py:190: AssertionError
_______________________ test_contains[image_png x File] ________________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: image_png, dtype: object
type = File, member = True
@pytest.mark.parametrize(**get_contains_cases(series, contains_map, typeset))
def test_contains(series, type, member):
"""Test the generated combinations for "series in type"
Args:
series: the series to test
type: the type to test against
member: the result
"""
result, message = contains(series, type, member)
> assert result, message
E AssertionError: image_png in File; expected True, got False
E assert False
tests/typesets/test_complete_set.py:190: AssertionError
_______________________ test_contains[image_png x Image] _______________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: image_png, dtype: object
type = Image, member = True
@pytest.mark.parametrize(**get_contains_cases(series, contains_map, typeset))
def test_contains(series, type, member):
"""Test the generated combinations for "series in type"
Args:
series: the series to test
type: the type to test against
member: the result
"""
result, message = contains(series, type, member)
> assert result, message
E AssertionError: image_png in Image; expected True, got False
E assert False
tests/typesets/test_complete_set.py:190: AssertionError
___________________ test_contains[image_png_missing x File] ____________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 ...c/visions-0.6.1/build/...
4 None
Name: image_png_missing, dtype: object
type = File, member = True
@pytest.mark.parametrize(**get_contains_cases(series, contains_map, typeset))
def test_contains(series, type, member):
"""Test the generated combinations for "series in type"
Args:
series: the series to test
type: the type to test against
member: the result
"""
result, message = contains(series, type, member)
> assert result, message
E AssertionError: image_png_missing in File; expected True, got False
E assert False
tests/typesets/test_complete_set.py:190: AssertionError
___________________ test_contains[image_png_missing x Image] ___________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 ...c/visions-0.6.1/build/...
4 None
Name: image_png_missing, dtype: object
type = Image, member = True
@pytest.mark.parametrize(**get_contains_cases(series, contains_map, typeset))
def test_contains(series, type, member):
"""Test the generated combinations for "series in type"
Args:
series: the series to test
type: the type to test against
member: the result
"""
result, message = contains(series, type, member)
> assert result, message
E AssertionError: image_png_missing in Image; expected True, got False
E assert False
tests/typesets/test_complete_set.py:190: AssertionError
_____________ test_inference[file_mixed_ext x File expected True] ______________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: file_mixed_ext, dtype: object
type = File, typeset = CompleteSet, difference = False
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of file_mixed_ext expected File to be True (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
_____________ test_inference[file_mixed_ext x Path expected False] _____________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: file_mixed_ext, dtype: object
type = Path, typeset = CompleteSet, difference = True
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of file_mixed_ext expected Path to be False (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
_______________ test_inference[image_png x Image expected True] ________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: image_png, dtype: object
type = Image, typeset = CompleteSet, difference = False
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of image_png expected Image to be True (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
_______________ test_inference[image_png x Path expected False] ________________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 /build/python-visions/src/visions-0.6.1/build/...
Name: image_png, dtype: object
type = Path, typeset = CompleteSet, difference = True
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of image_png expected Path to be False (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
___________ test_inference[image_png_missing x Image expected True] ____________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 ...c/visions-0.6.1/build/...
4 None
Name: image_png_missing, dtype: object
type = Image, typeset = CompleteSet, difference = False
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of image_png_missing expected Image to be True (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
___________ test_inference[image_png_missing x Path expected False] ____________
series = 0 /build/python-visions/src/visions-0.6.1/build/...
1 /build/python-visions/src/visions-0.6.1/build/...
2 ...c/visions-0.6.1/build/...
4 None
Name: image_png_missing, dtype: object
type = Path, typeset = CompleteSet, difference = True
@pytest.mark.parametrize(**get_inference_cases(series, inference_map, typeset))
def test_inference(series, type, typeset, difference):
"""Test the generated combinations for "inference(series) == type"
Args:
series: the series to test
type: the type to test against
"""
result, message = infers(series, type, typeset, difference)
> assert result, message
E AssertionError: inference of image_png_missing expected Path to be False (typeset=CompleteSet)
E assert False
tests/typesets/test_complete_set.py:317: AssertionError
=============================== warnings summary ===============================
tests/test_root.py::test_multiple_roots
/build/python-visions/src/visions-0.6.1/build/lib/visions/typesets/typeset.py:88: UserWarning: {Generic} were isolates in the type relation map and consequently orphaned. Please add some mapping to the orphaned nodes.
warnings.warn(message)
tests/test_summarization.py::test_complex_missing_summary
/usr/lib/python3.8/site-packages/numpy/core/_methods.py:47: ComplexWarning: Casting complex values to real discards the imaginary part
return umr_sum(a, axis, dtype, out, keepdims, initial, where)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tests/typesets/test_complete_set.py::test_contains[file_mixed_ext x File]
FAILED tests/typesets/test_complete_set.py::test_contains[image_png x File]
FAILED tests/typesets/test_complete_set.py::test_contains[image_png x Image]
FAILED tests/typesets/test_complete_set.py::test_contains[image_png_missing x File]
FAILED tests/typesets/test_complete_set.py::test_contains[image_png_missing x Image]
FAILED tests/typesets/test_complete_set.py::test_inference[file_mixed_ext x File expected True]
FAILED tests/typesets/test_complete_set.py::test_inference[file_mixed_ext x Path expected False]
FAILED tests/typesets/test_complete_set.py::test_inference[image_png x Image expected True]
FAILED tests/typesets/test_complete_set.py::test_inference[image_png x Path expected False]
FAILED tests/typesets/test_complete_set.py::test_inference[image_png_missing x Image expected True]
FAILED tests/typesets/test_complete_set.py::test_inference[image_png_missing x Path expected False]
================= 11 failed, 8954 passed, 2 warnings in 15.94s =================
see also the complete build log here
bug