@@ -330,7 +330,7 @@ def test_warn_on_redef_if_warn_on_redef_meta_missing(
330
330
assert (
331
331
"basilisp.lang.compiler.generator" ,
332
332
logging .WARNING ,
333
- f"redefining local Python name 'unique_djhvyz' in module '{ ns .name } '" ,
333
+ f"redefining local Python name 'unique_djhvyz' in module '{ ns .name } ' (test:2) " ,
334
334
) in caplog .record_tuples
335
335
336
336
def test_redef_vars (self , ns : runtime .Namespace , caplog ):
@@ -343,7 +343,7 @@ def test_redef_vars(self, ns: runtime.Namespace, caplog):
343
343
"""
344
344
)
345
345
assert (
346
- f"redefining local Python name 'orig' in module '{ ns .name } '"
346
+ f"redefining local Python name 'orig' in module '{ ns .name } ' (test:2) "
347
347
) not in caplog .messages
348
348
349
349
def test_def_dynamic (self , ns : runtime .Namespace ):
@@ -3011,7 +3011,7 @@ def test_warning_for_cross_ns_reference(self, other_ns, caplog):
3011
3011
assert (
3012
3012
"basilisp.lang.compiler.generator" ,
3013
3013
logging .WARNING ,
3014
- "could not resolve a direct link to Var 'm'" ,
3014
+ "could not resolve a direct link to Var 'm' (test:1) " ,
3015
3015
) in caplog .record_tuples
3016
3016
3017
3017
def test_no_warning_for_cross_ns_reference_if_warning_disabled (
@@ -3020,21 +3020,25 @@ def test_no_warning_for_cross_ns_reference_if_warning_disabled(
3020
3020
lcompile (
3021
3021
"(fn [] (other.ns/m :z))" , opts = {compiler .WARN_ON_VAR_INDIRECTION : False }
3022
3022
)
3023
- assert ("could not resolve a direct link to Var 'm'" ) not in caplog .messages
3023
+ assert (
3024
+ "could not resolve a direct link to Var 'm' (test:1)"
3025
+ ) not in caplog .messages
3024
3026
3025
3027
def test_warning_for_cross_ns_alias_reference (self , other_ns , caplog ):
3026
3028
lcompile ("(fn [] (other/m :z))" , opts = {compiler .WARN_ON_VAR_INDIRECTION : True })
3027
3029
assert (
3028
3030
"basilisp.lang.compiler.generator" ,
3029
3031
logging .WARNING ,
3030
- "could not resolve a direct link to Var 'm'" ,
3032
+ "could not resolve a direct link to Var 'm' (test:1) " ,
3031
3033
) in caplog .record_tuples
3032
3034
3033
3035
def test_no_warning_for_cross_ns_alias_reference_if_warning_disabled (
3034
3036
self , other_ns , caplog
3035
3037
):
3036
3038
lcompile ("(fn [] (other/m :z))" , opts = {compiler .WARN_ON_VAR_INDIRECTION : False })
3037
- assert ("could not resolve a direct link to Var 'm'" ) not in caplog .messages
3039
+ assert (
3040
+ "could not resolve a direct link to Var 'm' (test:1)"
3041
+ ) not in caplog .messages
3038
3042
3039
3043
def test_warning_on_imported_name (self , ns : runtime .Namespace , caplog ):
3040
3044
"""Basilisp should be able to directly resolve a link to cross-namespace
@@ -3047,7 +3051,7 @@ def test_warning_on_imported_name(self, ns: runtime.Namespace, caplog):
3047
3051
opts = {compiler .WARN_ON_VAR_INDIRECTION : True },
3048
3052
)
3049
3053
assert (
3050
- "could not resolve a direct link to Python variable 'string/m'"
3054
+ "could not resolve a direct link to Python variable 'string/m' (test:1) "
3051
3055
) not in caplog .messages
3052
3056
3053
3057
def test_exception_raised_for_nonexistent_imported_name (
0 commit comments