Skip to content

Commit 14ec724

Browse files
author
remimd
committed
tests
1 parent c680b38 commit 14ec724

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_inject.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,3 +279,18 @@ def _method(this=..., _: SomeInjectable = ...):
279279
@injectable
280280
class A:
281281
method = _method
282+
283+
def test_inject_with_passing_argument_do_not_lock_module(self, module):
284+
assert not module.is_locked
285+
286+
@module.singleton
287+
class A: ...
288+
289+
@module.inject
290+
def function(a: A): ...
291+
292+
function(A())
293+
assert not module.is_locked
294+
295+
function()
296+
assert module.is_locked

0 commit comments

Comments
 (0)