Skip to content

Commit 3aac7bb

Browse files
icweavergiordano
andauthored
Fix paths returned by find_tests (#66)
* fix subdirectory paths found * windows * what am i doing * Update test/runtests.jl * Bump version from 2.0.0 to 2.0.1 --------- Co-authored-by: Mosè Giordano <[email protected]>
1 parent c79f4cc commit 3aac7bb

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ParallelTestRunner"
22
uuid = "d3525ed8-44d0-4b2c-a655-542cee43accc"
33
authors = ["Valentin Churavy <[email protected]>"]
4-
version = "2.0.0"
4+
version = "2.0.1"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

src/ParallelTestRunner.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ function find_tests(dir::String)
484484
end
485485

486486
for file in files
487-
path = joinpath(rootpath, file * ".jl")
487+
path = joinpath(rootpath, basename(file * ".jl"))
488488
tests[file] = :(include($path))
489489
end
490490
end

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ cd(@__DIR__)
2424
@test isfile(ParallelTestRunner.get_history_file(ParallelTestRunner))
2525
end
2626

27+
@testset "subdir use" begin
28+
d = @__DIR__
29+
testsuite = find_tests(d)
30+
@test last(testsuite["basic"].args) == joinpath(d, "basic.jl")
31+
@test last(testsuite["subdir/subdir_test"].args) == joinpath(d, "subdir", "subdir_test.jl")
32+
end
33+
2734
@testset "custom tests" begin
2835
testsuite = Dict(
2936
"custom" => quote

test/subdir/subdir_test.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@test true

0 commit comments

Comments
 (0)