Skip to content

Commit b6d435b

Browse files
committed
Relax the test more since hash of Symbols might change between versions
1 parent f6cea4a commit b6d435b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/systems/abstractsystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ function n_extra_equations(sys::AbstractSystem)
737737
nextras = n_outer_stream_variables + length(ceqs)
738738
end
739739

740-
function Base.show(io::IO, ::MIME"text/plain", sys::AbstractSystem)
740+
function Base.show(io::IO, mime::MIME"text/plain", sys::AbstractSystem)
741741
eqs = equations(sys)
742742
vars = states(sys); nvars = length(vars)
743743
if eqs isa AbstractArray
@@ -806,7 +806,7 @@ function Base.show(io::IO, ::MIME"text/plain", sys::AbstractSystem)
806806
state = get_tearing_state(sys)
807807
if state !== nothing
808808
Base.printstyled(io, "\nIncidence matrix:"; color=:magenta)
809-
show(io, incidence_matrix(state.structure.graph, Num(Sym{Real}(:×))))
809+
show(io, mime, incidence_matrix(state.structure.graph, Num(Sym{Real}(:×))))
810810
end
811811
end
812812
return nothing

test/state_selection.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ModelingToolkit, OrdinaryDiffEq
1+
using ModelingToolkit, OrdinaryDiffEq, Test
22

33
@variables t
44
sts = @variables x1(t) x2(t) x3(t) x4(t)
@@ -21,7 +21,7 @@ let dd = dummy_derivative(sys)
2121
end
2222
@test has_dx1 has_dx2 # only one of x1 and x2 can be a dummy derivative
2323
@test length(states(dd)) == length(equations(dd)) == 9
24-
@test length(states(structural_simplify(dd))) <= 6
24+
@test length(states(structural_simplify(dd))) < 9
2525
end
2626

2727
let pss = partial_state_selection(sys)

0 commit comments

Comments
 (0)