Skip to content

Warnings when running tests #4618

@jtraglia

Description

@jtraglia

When running make test I get the following warnings:

tests/core/pyspec/eth2spec/test/altair/light_client/test_data_collection.py::test_light_client_data_collection
  /Users/jtraglia/Projects/leo/consensus-specs/venv/lib/python3.13/site-packages/_pytest/python.py:161: PytestReturnNotNoneWarning: Test functions should return None, but tests/core/pyspec/eth2spec/test/altair/light_client/test_data_collection.py::test_light_client_data_collection returned <class 'generator'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_light_client_sync
  /Users/jtraglia/Projects/leo/consensus-specs/venv/lib/python3.13/site-packages/_pytest/python.py:161: PytestReturnNotNoneWarning: Test functions should return None, but tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_light_client_sync returned <class 'generator'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_supply_sync_committee_from_past_update
  /Users/jtraglia/Projects/leo/consensus-specs/venv/lib/python3.13/site-packages/_pytest/python.py:161: PytestReturnNotNoneWarning: Test functions should return None, but tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_supply_sync_committee_from_past_update returned <class 'generator'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_advance_finality_without_sync_committee
  /Users/jtraglia/Projects/leo/consensus-specs/venv/lib/python3.13/site-packages/_pytest/python.py:161: PytestReturnNotNoneWarning: Test functions should return None, but tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_advance_finality_without_sync_committee returned <class 'generator'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_light_client_sync_no_force_update
  /Users/jtraglia/Projects/leo/consensus-specs/venv/lib/python3.13/site-packages/_pytest/python.py:161: PytestReturnNotNoneWarning: Test functions should return None, but tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py::test_light_client_sync_no_force_update returned <class 'generator'>.
  Did you mean to use `assert` instead of `return`?
  See https://docs.pytest.org/en/stable/how-to/assert.html#return-not-none for more information.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

We should fix these so there are no warnings.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions