-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(webapp): add more deprecated status triggers (#378)
- Loading branch information
1 parent
544a386
commit 09e0a23
Showing
3 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# standard imports | ||
import inspect | ||
|
||
|
||
def current_name() -> str: | ||
""" | ||
Get the name of the function that called this function | ||
Returns | ||
------- | ||
str | ||
the name of the function that called this function | ||
""" | ||
return inspect.currentframe().f_back.f_code.co_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# local imports | ||
from src.common import inspector | ||
|
||
|
||
def test_current_name(): | ||
assert inspector.current_name() == 'test_current_name' |