-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path__init__.py
More file actions
29 lines (23 loc) · 919 Bytes
/
__init__.py
File metadata and controls
29 lines (23 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from typing import Final
from injection import mod
from injection.loaders import LoadedProfile, ProfileLoader, load_profile
__all__ = (
"load_test_profile",
"reserve_scoped_test_slot",
"set_test_constant",
"should_be_test_injectable",
"test_constant",
"test_injectable",
"test_scoped",
"test_singleton",
)
_TEST_PROFILE_NAME: Final[str] = "__testing__"
reserve_scoped_test_slot = mod(_TEST_PROFILE_NAME).reserve_scoped_slot
set_test_constant = mod(_TEST_PROFILE_NAME).set_constant
should_be_test_injectable = mod(_TEST_PROFILE_NAME).should_be_injectable
test_constant = mod(_TEST_PROFILE_NAME).constant
test_injectable = mod(_TEST_PROFILE_NAME).injectable
test_scoped = mod(_TEST_PROFILE_NAME).scoped
test_singleton = mod(_TEST_PROFILE_NAME).singleton
def load_test_profile(loader: ProfileLoader | None = None) -> LoadedProfile:
return load_profile(_TEST_PROFILE_NAME, loader)