#1 Don't just ignore the tests, deselect the failing ones
Merged 2 months ago by lbalhar. Opened 2 months ago by churchyard.
rpms/ churchyard/python-cloudpickle pytest  into  master

file modified
+3 -3

@@ -21,7 +21,7 @@ 

  BuildRequires:  %{py3_dist setuptools}

  

  # Test requirements

- BuildRequires:  %{py3_dist mock pytest tornado}

+ BuildRequires:  %{py3_dist mock pytest tornado psutil}

  

  %description

  %{desc}

@@ -47,9 +47,9 @@ 

  

  

  %check

- # There is one test not working with Python 3

+ # file_handles tests fail, TypeError: cannot pickle '_io.FileIO' object

  # GH issue: https://github.com/cloudpipe/cloudpickle/issues/114

- %{__python3} setup.py test || :

+ %{__python3} -m pytest -v -k "not file_handles"

  

  %files -n python3-%{pypi_name}

  %license LICENSE

This means we switch setup.py test for pytest call:

  • setup.py test ignored pytest skip markers,
    running Python 2 only tests on Python 3,
    or Python 3.8 only tests on 3.7
  • direct pytest call allows deselecting failing tests instead of
    ignoring the entire result

Looks good to me. Thank you!

Pull-Request has been merged by lbalhar

2 months ago
Metadata