@@ -377,71 +377,74 @@ end
377377 @test contains (str, " has stale (unused) explicit imports for:" )
378378
379379 @testset " Tainted modules" begin
380- log = (:warn , r" Dynamic" )
381-
382- @test_logs log @test only_name_source (explicit_imports (DynMod, " DynMod.jl" )) ==
383- [DynMod => nothing , DynMod. Hidden => nothing ]
384- @test_logs log @test only_name_source (explicit_imports (DynMod, " DynMod.jl" ;
385- strict= false )) ==
386- [DynMod => [(; name= :print_explicit_imports ,
387- source= ExplicitImports)],
388- # Wrong! Missing explicit export
389- DynMod. Hidden => []]
390-
391- @test_logs log @test explicit_imports_nonrecursive (DynMod, " DynMod.jl" ) === nothing
392-
393- @test_logs log @test only_name_source (explicit_imports_nonrecursive (DynMod,
394- " DynMod.jl" ;
395- strict= false )) ==
396- [(; name= :print_explicit_imports , source= ExplicitImports)]
397- @test_logs log @test stale_explicit_imports (DynMod, " DynMod.jl" ) ==
398- [DynMod => nothing ,
399- DynMod. Hidden => nothing ]
400-
401- @test_logs log @test stale_explicit_imports_nonrecursive (DynMod, " DynMod.jl" ) ===
402- nothing
403-
404- @test_logs log @test stale_explicit_imports (DynMod, " DynMod.jl" ; strict= false ) ==
405- [DynMod => [],
406- # Wrong! Missing stale explicit export
407- DynMod. Hidden => []]
408-
409- @test_logs log @test stale_explicit_imports_nonrecursive (DynMod, " DynMod.jl" ;
410- strict= false ) ==
411- []
412- @test_logs log str = sprint (print_stale_explicit_imports, DynMod, " DynMod.jl" )
380+ # 3 dynamic include statements
381+ l = (:warn , r" Dynamic" )
382+ log = (l, l, l)
383+
384+ @test_logs log... @test only_name_source (explicit_imports (DynMod, " DynMod.jl" )) ==
385+ [DynMod => nothing , DynMod. Hidden => nothing ]
386+ @test_logs log... @test only_name_source (explicit_imports (DynMod, " DynMod.jl" ;
387+ strict= false )) ==
388+ [DynMod => [(; name= :print_explicit_imports ,
389+ source= ExplicitImports)],
390+ # Wrong! Missing explicit export
391+ DynMod. Hidden => []]
392+
393+ @test_logs log... @test explicit_imports_nonrecursive (DynMod, " DynMod.jl" ) ===
394+ nothing
395+
396+ @test_logs log... @test only_name_source (explicit_imports_nonrecursive (DynMod,
397+ " DynMod.jl" ;
398+ strict= false )) ==
399+ [(; name= :print_explicit_imports , source= ExplicitImports)]
400+ @test_logs log... @test stale_explicit_imports (DynMod, " DynMod.jl" ) ==
401+ [DynMod => nothing ,
402+ DynMod. Hidden => nothing ]
403+
404+ @test_logs log... @test stale_explicit_imports_nonrecursive (DynMod, " DynMod.jl" ) ===
405+ nothing
406+
407+ @test_logs log... @test stale_explicit_imports (DynMod, " DynMod.jl" ; strict= false ) ==
408+ [DynMod => [],
409+ # Wrong! Missing stale explicit export
410+ DynMod. Hidden => []]
411+
412+ @test_logs log... @test stale_explicit_imports_nonrecursive (DynMod, " DynMod.jl" ;
413+ strict= false ) ==
414+ []
415+ @test_logs log... str = sprint (print_stale_explicit_imports, DynMod, " DynMod.jl" )
413416 @test contains (str, " DynMod could not be accurately analyzed" )
414417
415- @test_logs log str = sprint (print_explicit_imports, DynMod, " DynMod.jl" )
418+ @test_logs log... str = sprint (print_explicit_imports, DynMod, " DynMod.jl" )
416419 @test contains (str, " DynMod could not be accurately analyzed" )
417420
418- @test_logs log @test check_no_implicit_imports (DynMod, " DynMod.jl" ;
419- allow_unanalyzable= (DynMod,
420- DynMod. Hidden)) ===
421- nothing
421+ @test_logs log... @test check_no_implicit_imports (DynMod, " DynMod.jl" ;
422+ allow_unanalyzable= (DynMod,
423+ DynMod. Hidden)) ===
424+ nothing
422425
423426 # Ignore also works
424- @test_logs log @test check_no_implicit_imports (DynMod, " DynMod.jl" ;
425- allow_unanalyzable= (DynMod,),
426- ignore= (DynMod. Hidden,)) ===
427- nothing
427+ @test_logs log... @test check_no_implicit_imports (DynMod, " DynMod.jl" ;
428+ allow_unanalyzable= (DynMod,),
429+ ignore= (DynMod. Hidden,)) ===
430+ nothing
428431
429432 e = UnanalyzableModuleException
430- @test_logs log @test_throws e check_no_implicit_imports (DynMod,
431- " DynMod.jl" )
433+ @test_logs log... @test_throws e check_no_implicit_imports (DynMod,
434+ " DynMod.jl" )
432435
433436 # Missed `Hidden`
434- @test_logs log @test_throws e check_no_implicit_imports (DynMod,
435- " DynMod.jl" ;
436- allow_unanalyzable= (DynMod,),)
437+ @test_logs log... @test_throws e check_no_implicit_imports (DynMod,
438+ " DynMod.jl" ;
439+ allow_unanalyzable= (DynMod,),)
437440
438- @test_logs log @test check_no_stale_explicit_imports (DynMod, " DynMod.jl" ;
439- allow_unanalyzable= (DynMod,
440- DynMod. Hidden)) ===
441- nothing
441+ @test_logs log... @test check_no_stale_explicit_imports (DynMod, " DynMod.jl" ;
442+ allow_unanalyzable= (DynMod,
443+ DynMod. Hidden)) ===
444+ nothing
442445
443- @test_logs log @test_throws e check_no_stale_explicit_imports (DynMod,
444- " DynMod.jl" )
446+ @test_logs log... @test_throws e check_no_stale_explicit_imports (DynMod,
447+ " DynMod.jl" )
445448
446449 str = sprint (Base. showerror, UnanalyzableModuleException (DynMod))
447450 @test contains (str, " was found to be unanalyzable" )
0 commit comments