debian/rules binary"ignore"`. To raise an exception, pass "raise".
dh binary --with python3 --buildsystem=pybuild
dh_update_autotools_config -O--buildsystem=pybuild
dh_autoreconf -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
dh_auto_build -O--buildsystem=pybuild
I: pybuild plugin_pyproject:129: Building wheel for python3.12 with "build" module
I: pybuild base:305: python3.12 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_in-n-out
* Building wheel...
Successfully built in_n_out-0.1.8-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.12 with "installer" module
I: pybuild plugin_pyproject:129: Building wheel for python3.11 with "build" module
I: pybuild base:305: python3.11 -m build --skip-dependency-check --no-isolation --wheel --outdir /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_in-n-out
* Building wheel...
Successfully built in_n_out-0.1.8-py3-none-any.whl
I: pybuild plugin_pyproject:144: Unpacking wheel built for python3.11 with "installer" module
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:305: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_in-n-out/build; python3.12 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.12.2, pytest-8.0.2, pluggy-1.4.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_in-n-out/build
configfile: pyproject.toml
collected 119 items / 2 skipped
tests/test_injection.py ..............................................F. [ 40%]
............... [ 52%]
tests/test_logging.py . [ 53%]
tests/test_processors.py ........... [ 63%]
tests/test_providers.py ........ [ 69%]
tests/test_store.py .... [ 73%]
tests/test_type_resolution.py ....s.. [ 78%]
tests/test_type_support.py ......................... [100%]
=================================== FAILURES ===================================
___________ test_injection_errors[unknown_and_unannotated-warn-warn] ___________
in_func = <function unknown_and_unannotated at 0x7f088ff11800>
on_unresolved = 'warn', on_unannotated = 'warn'
@pytest.mark.parametrize("on_unresolved", modes)
@pytest.mark.parametrize("on_unannotated", modes)
@pytest.mark.parametrize("in_func", [unknown, unannotated, unknown_and_unannotated])
def test_injection_errors(in_func, on_unresolved, on_unannotated):
ctx: ContextManager = nullcontext()
ctxb: ContextManager = nullcontext()
expect_same_func_back = False
UNANNOTATED_MSG = "Injecting dependencies .* with a required, unannotated param"
if "unknown" in in_func.__name__ and on_unresolved != "ignore":
# required params with unknown annotations
UNRESOLVED_MSG = "Could not resolve type hint for required parameter"
if on_unresolved == "raise":
ctx = pytest.raises(NameError, match=UNRESOLVED_MSG)
elif on_unresolved == "warn":
ctx = pytest.warns(UserWarning, match=UNRESOLVED_MSG)
if "unannotated" in in_func.__name__:
if on_unannotated == "raise":
ctxb = pytest.raises(TypeError, match=UNANNOTATED_MSG)
elif on_unannotated == "return":
expect_same_func_back = True
else:
expect_same_func_back = True
elif "unannotated" in in_func.__name__: # required params without annotations
if on_unannotated == "raise":
ctx = pytest.raises(TypeError, match=UNANNOTATED_MSG)
elif on_unannotated == "warn":
ctx = pytest.warns(UserWarning, match=UNANNOTATED_MSG)
elif on_unannotated == "return":
expect_same_func_back = True
with ctx, ctxb:E UserWarning: ("Injecting dependencies on function ('unknown_and_unannotated',) with a required, unannotated parameter 'x'. This will fail later unless that parameter is provided at call-time.",) To allow this, pass `on_unannotated_required_args=
tests/test_injection.py:159: UserWarning"ignore"`. To raise an exception, pass "raise".
=========================== short test summary info ============================
FAILED tests/test_injection.py::test_injection_errors[unknown_and_unannotated-warn-warn]
=================== 1 failed, 117 passed, 3 skipped in 0.38s ===================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_in-n-out/build; python3.12 -m pytest tests
I: pybuild base:305: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_in-n-out/build; python3.11 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.11.8, pytest-8.0.2, pluggy-1.4.0
rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_in-n-out/build
configfile: pyproject.toml
collected 119 items / 2 skipped
tests/test_injection.py ..............................................F. [ 40%]
............... [ 52%]
tests/test_logging.py . [ 53%]
tests/test_processors.py ........... [ 63%]
tests/test_providers.py ........ [ 69%]
tests/test_store.py .... [ 73%]
tests/test_type_resolution.py ....s.. [ 78%]
tests/test_type_support.py ......................... [100%]
=================================== FAILURES ===================================
___________ test_injection_errors[unknown_and_unannotated-warn-warn] ___________
in_func = <function unknown_and_unannotated at 0x7f781aa52c00>
on_unresolved = 'warn', on_unannotated = 'warn'
@pytest.mark.parametrize("on_unresolved", modes)
@pytest.mark.parametrize("on_unannotated", modes)
@pytest.mark.parametrize("in_func", [unknown, unannotated, unknown_and_unannotated])
def test_injection_errors(in_func, on_unresolved, on_unannotated):
ctx: ContextManager = nullcontext()
ctxb: ContextManager = nullcontext()
expect_same_func_back = False
UNANNOTATED_MSG = "Injecting dependencies .* with a required, unannotated param"
if "unknown" in in_func.__name__ and on_unresolved != "ignore":
# required params with unknown annotations
UNRESOLVED_MSG = "Could not resolve type hint for required parameter"
if on_unresolved == "raise":
ctx = pytest.raises(NameError, match=UNRESOLVED_MSG)
elif on_unresolved == "warn":
ctx = pytest.warns(UserWarning, match=UNRESOLVED_MSG)
if "unannotated" in in_func.__name__:
if on_unannotated == "raise":
ctxb = pytest.raises(TypeError, match=UNANNOTATED_MSG)
elif on_unannotated == "return":
expect_same_func_back = True
else:
expect_same_func_back = True
elif "unannotated" in in_func.__name__: # required params without annotations
if on_unannotated == "raise":
ctx = pytest.raises(TypeError, match=UNANNOTATED_MSG)
elif on_unannotated == "warn":
ctx = pytest.warns(UserWarning, match=UNANNOTATED_MSG)
elif on_unannotated == "return":
expect_same_func_back = True
with ctx, ctxb:E UserWarning: ("Injecting dependencies on function ('unknown_and_unannotated',) with a required, unannotated parameter 'x'. This will fail later unless that parameter is provided at call-time.",) To allow this, pass `on_unannotated_required_args=
tests/test_injection.py:159: UserWarning
=========================== short test summary info ============================
FAILED tests/test_injection.py::test_injection_errors[unknown_and_unannotated-warn-warn]
=================== 1 failed, 117 passed, 3 skipped in 0.35s ===================
E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11_in-n-out/build; python3.11 -m pytest tests
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.12 3.11" returned exit code 13
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:23:13 |
Calls: | 6,666 |
Files: | 12,213 |
Messages: | 5,335,879 |