-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
dev/testRelated to development/testing of the projectRelated to development/testing of the project
Description
linehaul-cloud-function/tests/unit/events/test_parser.py
Lines 45 to 46 in 64732ba
| # @pytest.mark.parametrize(("event_data", "expected"), _load_event_fixtures(FIXTURE_DIR)) | |
| @pytest.mark.skip(reason="needs updated!") |
Currently the test fixtures for event parsing are not executed during the test suite.
This impacts the ability to reason safely about changes to the logging message formats.
Unskipping the tests fails with:
$ python -m pytest tests/unit/
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.11.14, pytest-9.0.2, pluggy-1.6.0
rootdir: /Users/miketheman/workspace/miketheman/linehaul-cloud-function
configfile: pyproject.toml
plugins: hypothesis-6.151.6
collected 67 items / 1 error
============================================================================ ERRORS ============================================================================
______________________________________________________ ERROR collecting tests/unit/events/test_parser.py _______________________________________________________
+ Exception Group Traceback (most recent call last):
| File "/Users/miketheman/workspace/miketheman/linehaul-cloud-function/tests/unit/events/test_parser.py", line 37, in _load_event_fixtures
| _cattr.structure(result, Download)
| File "/Users/miketheman/workspace/miketheman/linehaul-cloud-function/.venv/lib/python3.11/site-packages/cattrs/converters.py", line 589, in structure
| return self._structure_func.dispatch(cl)(obj, cl)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| File "<cattrs generated structure linehaul.events.parser.Download>", line 48, in structure_Download
| if errors: raise __c_cve('While structuring ' + 'Download', errors, __cl)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| cattrs.errors.ClassValidationError: While structuring Download (1 sub-exception)
+-+---------------- 1 ----------------
| Traceback (most recent call last):
| File "<cattrs generated structure linehaul.events.parser.Download>", line 15, in structure_Download
| res['project'] = __c_structure_project(o['project'], __c_type_project)
| ~^^^^^^^^^^^
| KeyError: 'project'
| Structuring class Download @ attribute project
+------------------------------------
=================================================================== short test summary info ====================================================================
ERROR tests/unit/events/test_parser.py - KeyError('project') [single exception in ClassValidationError]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================= 1 error in 0.27s =======================================================================Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dev/testRelated to development/testing of the projectRelated to development/testing of the project