Skip to content

Commit

Permalink
fix various tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bvdmitri committed May 9, 2024
1 parent 3469121 commit 930b7bf
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ end
getproperties,
PluginsCollection,
VariationalConstraintsPlugin,
with_plugins
with_plugins,
datalabel

include("../../testutils.jl")

Expand All @@ -364,7 +365,7 @@ end
model = create_model(
with_plugins(random_walk(a = 1, b = 2), PluginsCollection(VariationalConstraintsPlugin(constraints)))
) do model, context
return (; y = getorcreate!(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
return (; y = datalabel(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
end

@test length(collect(filter(as_node(Normal), model))) === 2 * n
Expand Down Expand Up @@ -393,7 +394,7 @@ end
model = create_model(
with_plugins(random_walk(a = 1, b = 2), PluginsCollection(VariationalConstraintsPlugin(constraints)))
) do model, context
return (; y = getorcreate!(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
return (; y = datalabel(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
end

@test length(collect(filter(as_node(Normal), model))) == 2 * n
Expand Down Expand Up @@ -489,7 +490,8 @@ end
getproperties,
PluginsCollection,
VariationalConstraintsPlugin,
with_plugins
with_plugins,
datalabel

include("../../testutils.jl")

Expand Down Expand Up @@ -559,7 +561,7 @@ end
model = create_model(
with_plugins(random_walk(a = 1, b = 2), PluginsCollection(VariationalConstraintsPlugin(constraints)))
) do model, context
return (; y = getorcreate!(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
return (; y = datalabel(model, context, NodeCreationOptions(kind = :data, factorized = true), :y, 1:n))
end

@test length(collect(filter(as_node(Normal), model))) == 2 * n
Expand Down Expand Up @@ -919,7 +921,8 @@ end
NodeCreationOptions,
LazyIndex,
getextra,
hasextra
hasextra,
datalabel

include("../../testutils.jl")

Expand Down Expand Up @@ -953,7 +956,7 @@ end
model = create_model(
with_plugins(some_state_space_model(), PluginsCollection(VariationalConstraintsPlugin(constraints)))
) do model, context
return (; y = getorcreate!(model, context, NodeCreationOptions(kind = :data, factorized = false), :y, LazyIndex(ydata)))
return (; y = datalabel(model, context, NodeCreationOptions(kind = :data, factorized = false), :y, ydata))
end

@test length(collect(filter(as_node(Normal), model))) == 21
Expand Down

0 comments on commit 930b7bf

Please sign in to comment.