Skip to content

Commit 7ee156c

Browse files
Fix FastLapack test to use GenericLUFactorization as always_loaded
Updated the FastLapack test to use GenericLUFactorization as the always_loaded algorithm instead of FastLUFactorization. This ensures the test can correctly verify fallback behavior since GenericLUFactorization is always available while FastLUFactorization requires the FastLapackInterface extension. When the preference system is fully active: - best_algorithm = FastLUFactorization (when extension loaded) - best_always_loaded = GenericLUFactorization (fallback when not loaded) This provides a realistic test scenario where the always_loaded algorithm can actually be chosen when the best algorithm is not available. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3dc46f1 commit 7ee156c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/preferences.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ using Preferences
5858
@testset "FastLapack Extension Conditional Loading" begin
5959
# Test FastLapack loading conditionally and algorithm availability
6060

61-
# Preferences should still be set
62-
@test Preferences.load_preference(LinearSolve, "best_algorithm_Float64_medium", nothing) == "RFLUFactorization"
63-
@test Preferences.load_preference(LinearSolve, "best_always_loaded_Float64_medium", nothing) == "FastLUFactorization"
61+
# Set preferences with GenericLU as always_loaded so it can be hit correctly
62+
Preferences.set_preferences!(LinearSolve, "best_algorithm_Float64_medium" => "FastLUFactorization"; force = true)
63+
Preferences.set_preferences!(LinearSolve, "best_always_loaded_Float64_medium" => "GenericLUFactorization"; force = true)
64+
65+
# Verify preferences are set
66+
@test Preferences.load_preference(LinearSolve, "best_algorithm_Float64_medium", nothing) == "FastLUFactorization"
67+
@test Preferences.load_preference(LinearSolve, "best_always_loaded_Float64_medium", nothing) == "GenericLUFactorization"
6468

6569
A = rand(Float64, 150, 150) + I(150)
6670
b = rand(Float64, 150)

0 commit comments

Comments
 (0)