File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 82
82
@testset " show" begin
83
83
@test sprint (show, ScopedValue {Int} ()) == " Base.ScopedValues.ScopedValue{$Int }(undefined)"
84
84
@test sprint (show, sval) == " Base.ScopedValues.ScopedValue{$Int }(1)"
85
- @test sprint (show, Core. current_scope ()) == " nothing"
85
+ if Core. current_scope () === nothing
86
+ # Base.runtests uses @timed which introduces a scope for scheduler timing
87
+ @test sprint (show, Core. current_scope ()) == " nothing"
88
+ end
86
89
with (sval => 2.0 ) do
87
90
@test sprint (show, sval) == " Base.ScopedValues.ScopedValue{$Int }(2)"
88
91
objid = sprint (show, Base. objectid (sval))
89
- @test sprint (show, Core. current_scope ()) == " Base.ScopedValues.Scope(Base.ScopedValues.ScopedValue{$Int }@$objid => 2)"
92
+ # Base.runtests uses @timed which introduces a scope for scheduler timing
93
+ @test startswith (sprint (show, Core. current_scope ()), " Base.ScopedValues.Scope(" )
94
+ @test contains (sprint (show, Core. current_scope ()), " Base.ScopedValues.ScopedValue{$Int }@$objid => 2" )
90
95
end
91
96
end
92
97
You can’t perform that action at this time.
0 commit comments