Skip to content

Commit e763b63

Browse files
committed
Fix model_parsing tests
1 parent 089649e commit e763b63

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/model_parsing.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ENV["MTK_ICONS_DIR"] = "$(@__DIR__)/icons"
99

1010
# Mock module used to test if the `@mtkmodel` macro works with fully-qualified names as well.
1111
module MyMockModule
12-
using ..ModelingToolkit, ..Unitful
12+
using ModelingToolkit, DynamicQuantities
1313

1414
export Pin
1515
@connector Pin begin
@@ -328,6 +328,8 @@ end
328328

329329
# Ensure that modules consisting MTKModels with component arrays and icons of
330330
# `Expr` type and `unit` metadata can be precompiled.
331+
module PrecompilationTest
332+
using Unitful, Test, ModelingToolkit
331333
@testset "Precompile packages with MTKModels" begin
332334
push!(LOAD_PATH, joinpath(@__DIR__, "precompile_test"))
333335

@@ -340,6 +342,7 @@ end
340342

341343
pop!(LOAD_PATH)
342344
end
345+
end
343346

344347
@testset "Conditional statements inside the blocks" begin
345348
@mtkmodel C begin end

test/precompile_test/ModelParsingPrecompile.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module ModelParsingPrecompile
22

3-
using ModelingToolkit
4-
using Unitful
3+
using ModelingToolkit, Unitful
54

65
@mtkmodel ModelWithComponentArray begin
76
@parameters begin

0 commit comments

Comments
 (0)