Skip to content

Commit d37fbf5

Browse files
authored
Replace import -> using when importing symbols (#71)
This avoids accidentally extending methods.
1 parent 3aac7bb commit d37fbf5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ParallelTestRunner.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Serialization
1212
import Test
1313
import Random
1414
import IOCapture
15-
import Test: DefaultTestSet
15+
using Test: DefaultTestSet
1616

1717
function anynonpass(ts::Test.AbstractTestSet)
1818
@static if VERSION >= v"1.13.0-DEV.1037"
@@ -240,11 +240,11 @@ function runtest(f, name, init_code, color)
240240
function inner()
241241
# generate a temporary module to execute the tests in
242242
mod = @eval(Main, module $(gensym(name)) end)
243-
@eval(mod, import ParallelTestRunner: Test, Random)
243+
@eval(mod, using ParallelTestRunner: Test, Random)
244244
@eval(mod, using .Test, .Random)
245245
# Both bindings must be imported since `@testset` can't handle fully-qualified names when VERSION < v"1.11.0-DEV.1518".
246-
@eval(mod, import ParallelTestRunner: WorkerTestSet)
247-
@eval(mod, import Test: DefaultTestSet)
246+
@eval(mod, using ParallelTestRunner: WorkerTestSet)
247+
@eval(mod, using Test: DefaultTestSet)
248248

249249
Core.eval(mod, init_code)
250250

0 commit comments

Comments
 (0)