Skip to content

Commit

Permalink
test: update tests for assets outside src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Strömer committed Jun 1, 2024
1 parent 3f0a9e7 commit 3cb5544
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ import JET

@testset "IESoptLib.jl (basic)" verbose = true begin
path_iesoptlib = abspath(dirname(pathof(IESoptLib)))
path_assets = abspath(path_iesoptlib, "..", "assets")

@test relpath(get_path(:addons), path_iesoptlib) == "addons"
@test relpath(get_path(:examples), path_iesoptlib) == "examples"
@test relpath(get_path(:templates), path_iesoptlib) == "templates"
@test relpath(get_path(:addons), path_assets) == "addons"
@test relpath(get_path(:examples), path_assets) == "examples"
@test relpath(get_path(:templates), path_assets) == "templates"

@test_throws ArgumentError get_path(:other)

n = "01_basic_single_node"
@test get_filename(:example, n) == joinpath(get_path(:examples), "$(n).iesopt.yaml")
# TODO: test addons & templates
n = "CHP"
@test get_filename(:template, n) == joinpath(get_path(:templates), "$(n).iesopt.template.yaml")
# TODO: test addons

@test_throws ArgumentError get_filename(:other, n)
end
Expand Down

0 comments on commit 3cb5544

Please sign in to comment.