File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public sealed class ModelIntegrationTests
1414 public async Task NativeBackendAnswersSimpleMathAsync ( )
1515 {
1616 TestEnvironment . EnsureInitialized ( ) ;
17- EnsureAssetsOrSkip ( ) ;
17+ EnsureAssets ( ) ;
1818
1919 var options = CreateOptions ( ) ;
2020 using var backend = MlxNativeBackend . Create ( options ) ;
@@ -59,18 +59,14 @@ private static MlxClientOptions CreateOptions()
5959 return options ;
6060 }
6161
62- private static void EnsureAssetsOrSkip ( )
62+ private static void EnsureAssets ( )
6363 {
6464 var modelPath = Environment . GetEnvironmentVariable ( "MLXSHARP_MODEL_PATH" ) ;
65- if ( string . IsNullOrWhiteSpace ( modelPath ) || ! System . IO . Directory . Exists ( modelPath ) )
66- {
67- Skip . If ( true , "Native model bundle not found." ) ;
68- }
65+ Assert . False ( string . IsNullOrWhiteSpace ( modelPath ) , "Native model bundle path is not configured. Set MLXSHARP_MODEL_PATH to a valid directory." ) ;
66+ Assert . True ( System . IO . Directory . Exists ( modelPath ) , $ "Native model bundle not found at '{ modelPath } '.") ;
6967
7068 var library = Environment . GetEnvironmentVariable ( "MLXSHARP_LIBRARY" ) ;
71- if ( string . IsNullOrWhiteSpace ( library ) || ! System . IO . File . Exists ( library ) )
72- {
73- Skip . If ( true , "Native libmlxsharp library not configured." ) ;
74- }
69+ Assert . False ( string . IsNullOrWhiteSpace ( library ) , "Native libmlxsharp library is not configured. Set MLXSHARP_LIBRARY to the compiled native library." ) ;
70+ Assert . True ( System . IO . File . Exists ( library ) , $ "Native libmlxsharp library not found at '{ library } '.") ;
7571 }
7672}
You can’t perform that action at this time.
0 commit comments