angr/claripy

pytest skips tests

Closed this issue · 1 comments

Description

When running pytest on claripy, it skips certain test directories because: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_composite_discrepancy will be ignored

Steps to reproduce the bug

git clone git@github.com:angr/claripy
cd claripy
pytest 

Environment

A clean install of claripy master, this commit: 0c1f0e2

I created a new virtualenv and installed pytest and pytest-xdist.

This was on an M1 Mac.

Additional context

Actual output:

(test) zwimer@Lotus ~/D/real_c> pytest -n9                                                                                                                                                                                                lint-bk-z3
================================================================================================================ test session starts ================================================================================================================
platform darwin -- Python 3.10.8, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/zwimer/Desktop/real_c
plugins: xdist-3.0.2
gw0 [255] / gw1 [255] / gw2 [255] / gw3 [255] / gw4 [255] / gw5 [255] / gw6 [255] / gw7 [255] / gw8 [255]
.................................................sssss......sssssssss.......s.sssss..s.ssss.s...................ss..ssssss.....ssssss.sss..sssss.sssss..s.s..ss..ss....s.........................................xxxxx....xx.x......x....x... [ 92%]
..................                                                                                                                                                                                                                            [100%]
================================================================================================================= warnings summary ==================================================================================================================
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
  tests/test_solver.py:17: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_solver will be ignored
    def test_solver():

tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
  tests/test_solver.py:23: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_hybrid_solver will be ignored
    def test_hybrid_solver():

tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
  tests/test_solver.py:77: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_replacement_solver will be ignored
    def test_replacement_solver():

tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
  tests/test_solver.py:295: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_solver_branching will be ignored
    def test_solver_branching():

tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
  tests/test_solver.py:333: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_combine will be ignored
    def test_combine():

tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
  tests/test_solver.py:380: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_composite_solver will be ignored
    def test_composite_solver():

tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
  tests/test_solver.py:439: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_minmax will be ignored
    def test_minmax():

tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
  tests/test_solver.py:455: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_composite_discrepancy will be ignored
    def test_composite_discrepancy():

tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
  tests/test_solver.py:557: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_ancestor_merge will be ignored
    def test_ancestor_merge():

tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
  tests/test_solver.py:586: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_unsat_core will be ignored
    def test_unsat_core():

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================= 185 passed, 60 skipped, 10 xfailed, 90 warnings in 5.77s ==============================================================================================
(test) zwimer@Lotus ~/D/real_c> g co master                                                                    lint-bk-z3
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
(test) zwimer@Lotus ~/D/real_c> pytest -n9                                                                         master
================================================== test session starts ===================================================
platform darwin -- Python 3.10.8, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/zwimer/Desktop/real_c
plugins: xdist-3.0.2
gw0 [255] / gw1 [255] / gw2 [255] / gw3 [255] / gw4 [255] / gw5 [255] / gw6 [255] / gw7 [255] / gw8 [255]
...........................................................sss.ssss..s.sssss.ssss.ssssss....ss........s.s....s...s [ 43%]
sss.....ssss..sss.sssss..sss.sssssssssss.ss.......................................................xxx.x.x...xxxxx. [ 89%]
...........................                                                                                        [100%]
==================================================== warnings summary ====================================================
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
tests/test_solver.py:17
  tests/test_solver.py:17: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_solver will be ignored
    def test_solver():

tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
tests/test_solver.py:23
  tests/test_solver.py:23: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_hybrid_solver will be ignored
    def test_hybrid_solver():

tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
tests/test_solver.py:77
  tests/test_solver.py:77: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_replacement_solver will be ignored
    def test_replacement_solver():

tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
tests/test_solver.py:295
  tests/test_solver.py:295: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_solver_branching will be ignored
    def test_solver_branching():

tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
tests/test_solver.py:333
  tests/test_solver.py:333: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_combine will be ignored
    def test_combine():

tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
tests/test_solver.py:380
  tests/test_solver.py:380: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_composite_solver will be ignored
    def test_composite_solver():

tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
tests/test_solver.py:439
  tests/test_solver.py:439: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_minmax will be ignored
    def test_minmax():

tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
tests/test_solver.py:455
  tests/test_solver.py:455: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_composite_discrepancy will be ignored
    def test_composite_discrepancy():

tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
tests/test_solver.py:557
  tests/test_solver.py:557: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_ancestor_merge will be ignored
    def test_ancestor_merge():

tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
tests/test_solver.py:586
  tests/test_solver.py:586: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_unsat_core will be ignored
    def test_unsat_core():

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ 185 passed, 60 skipped, 10 xfailed, 90 warnings in 5.70s ================================

Looks like test_solver.py got missed when removing all nose-style generator tests cases. Should be a quick and easy refactor.