2024-02-09 03:10:11 +00:00
|
|
|
Index: celery-5.3.6/celery/contrib/pytest.py
|
2020-11-17 04:19:59 +00:00
|
|
|
===================================================================
|
2024-02-09 03:10:11 +00:00
|
|
|
--- celery-5.3.6.orig/celery/contrib/pytest.py
|
|
|
|
+++ celery-5.3.6/celery/contrib/pytest.py
|
2022-07-16 11:10:21 +00:00
|
|
|
@@ -19,16 +19,6 @@ NO_WORKER = os.environ.get('NO_WORKER')
|
2020-11-17 04:19:59 +00:00
|
|
|
# Well, they're called fixtures....
|
|
|
|
|
|
|
|
|
|
|
|
-def pytest_configure(config):
|
|
|
|
- """Register additional pytest configuration."""
|
|
|
|
- # add the pytest.mark.celery() marker registration to the pytest.ini [markers] section
|
2022-07-16 11:10:21 +00:00
|
|
|
- # this prevents pytest 4.5 and newer from issuing a warning about an unknown marker
|
2020-11-17 04:19:59 +00:00
|
|
|
- # and shows helpful marker documentation when running pytest --markers.
|
|
|
|
- config.addinivalue_line(
|
|
|
|
- "markers", "celery(**overrides): override celery configuration for a test case"
|
|
|
|
- )
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@contextmanager
|
|
|
|
def _create_app(enable_logging=False,
|
|
|
|
use_trap=False,
|
2024-02-09 03:10:11 +00:00
|
|
|
Index: celery-5.3.6/t/unit/conftest.py
|
2020-11-17 04:19:59 +00:00
|
|
|
===================================================================
|
2024-02-09 03:10:11 +00:00
|
|
|
--- celery-5.3.6.orig/t/unit/conftest.py
|
|
|
|
+++ celery-5.3.6/t/unit/conftest.py
|
|
|
|
@@ -56,6 +56,16 @@ class WhateverIO(io.StringIO):
|
2022-07-16 11:10:21 +00:00
|
|
|
_SIO_write(self, data.decode() if isinstance(data, bytes) else data)
|
2020-11-17 04:19:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
+def pytest_configure(config):
|
|
|
|
+ """Register additional pytest configuration."""
|
|
|
|
+ # add the pytest.mark.celery() marker registration to the pytest.ini [markers] section
|
|
|
|
+ # this prevents pytest 4.5 and newer from issueing a warning about an unknown marker
|
|
|
|
+ # and shows helpful marker documentation when running pytest --markers.
|
|
|
|
+ config.addinivalue_line(
|
|
|
|
+ "markers", "celery(**overrides): override celery configuration for a test case"
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
@pytest.fixture(scope='session')
|
|
|
|
def celery_config():
|
|
|
|
return {
|