Wrap package and generated tests in a test set

This commit is contained in:
Chris de Graaf 2017-11-14 18:20:18 +00:00
parent 46066fd563
commit 545a4c5688
2 changed files with 7 additions and 3 deletions

View File

@ -208,8 +208,10 @@ function gen_tests(dir::AbstractString, pkg_name::AbstractString, template::Temp
using $pkg_name using $pkg_name
using Base.Test using Base.Test
# Write your own tests here. @testset "$pkg_name.jl" begin
@test 1 == 2 # Write your own tests here.
@test 1 == 2
end
""" """
gen_file(joinpath(dir, pkg_name, "test", "runtests.jl"), text) gen_file(joinpath(dir, pkg_name, "test", "runtests.jl"), text)

View File

@ -10,7 +10,9 @@ mktempdir() do temp_dir
withenv("JULIA_PKGDIR" => temp_dir) do withenv("JULIA_PKGDIR" => temp_dir) do
Pkg.init() Pkg.init()
cd(temp_dir) do cd(temp_dir) do
include("tests.jl") @testset "PkgTemplates.jl" begin
include("tests.jl")
end
end end
end end
end end