1414
1515def test_root_pkg_not_duplicated_in_logger_name ():
1616 '''
17- When both `_root_name ` and `name` are passed and they have
17+ When both `pkg_name ` and `name` are passed and they have
1818 a common `<root_name>.< >` prefix, ensure that it is not
1919 duplicated in the child's `StackLevelAdapter.name: str`.
2020
@@ -23,12 +23,12 @@ def test_root_pkg_not_duplicated_in_logger_name():
2323 pkg_path : str = 'pylib.subpkg.mod'
2424
2525 proj_log = tractor .log .get_logger (
26- _root_name = project_name ,
26+ pkg_name = project_name ,
2727 mk_sublog = False ,
2828 )
2929
3030 sublog = tractor .log .get_logger (
31- _root_name = project_name ,
31+ pkg_name = project_name ,
3232 name = pkg_path ,
3333 )
3434
@@ -64,6 +64,7 @@ def load_module_from_path(
6464
6565def test_implicit_mod_name_applied_for_child (
6666 testdir : pytest .Pytester ,
67+ loglevel : str ,
6768):
6869 '''
6970 Verify that when `.log.get_logger(pkg_name='pylib')` is called
@@ -72,11 +73,12 @@ def test_implicit_mod_name_applied_for_child(
7273 module.
7374
7475 '''
76+ # tractor.log.get_console_log(level=loglevel)
7577 proj_name : str = 'snakelib'
7678 mod_code : str = (
7779 f'import tractor\n '
7880 f'\n '
79- f'log = tractor.log.get_logger(_root_name ="{ proj_name } ")\n '
81+ f'log = tractor.log.get_logger(pkg_name ="{ proj_name } ")\n '
8082 )
8183
8284 # create a sub-module for each pkg layer
@@ -112,7 +114,7 @@ def test_implicit_mod_name_applied_for_child(
112114 module_name = proj_name ,
113115 )
114116 pkg_root_log = tractor .log .get_logger (
115- _root_name = proj_name ,
117+ pkg_name = proj_name ,
116118 mk_sublog = False ,
117119 )
118120 assert pkg_root_log .name == proj_name
0 commit comments