Skip to content

Testing test_components_from_metric_edge_cases breaks around line 130 on some environments #264

Closed
@RobinVogel

Description

@RobinVogel

This might be a particularly weird and not primordial issue.

Description

One of the tests fails on a newly created environment, depending on the platform I test on.

Steps/Code to Reproduce

With Python 3.7.5 installed with Anaconda:

conda create -n test_env numpy scipy pytest scikit-learn
conda activate test_env
pytest test/test_components_metric_conversion.py

Expected Results

Tests run without failure on any platform.

Actual Results

Fails around line 130 of test/test_components_metric_conversion.py for on the two platform tested.

============================================== FAILURES 
[...]
      assert np.linalg.slogdet(M)[1] > 1  # (just to show that the computed
      # determinant is far from null)
      with pytest.raises(LinAlgError) as err_msg:
>       np.linalg.cholesky(M)
E       Failed: DID NOT RAISE <class 'numpy.linalg.LinAlgError'>

test/test_components_metric_conversion.py:130: Failed

Versions

The environment in which it fails:

Linux-4.18.0-25-generic-x86_64-with-debian-buster-sid
Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0]
NumPy 1.17.2
SciPy 1.3.1
Scikit-Learn 0.21.3
Metric-Learn 0.5.0

The environment in which it passes:

Linux-5.0.0-32-generic-x86_64-with-debian-buster-sid
Python 3.7.4 (default, Aug 13 2019, 20:35:49) 
[GCC 7.3.0]
NumPy 1.17.2
SciPy 1.3.1
Scikit-Learn 0.21.3
Metric-Learn 0.5.0

So the only difference is the platform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions