File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 runs-on : ubuntu-latest
2929 steps :
3030 - uses : actions/checkout@v4
31+ - uses : actions/setup-python@v5
32+ with :
33+ python-version : " 3.12"
34+ - run : pip install numpy h5py
3135 - name : Rust tests
3236 run : cargo test --features all-formats
3337
Original file line number Diff line number Diff line change @@ -17,12 +17,17 @@ fn fixture(name: &str) -> PathBuf {
1717 if !dir. join ( "contiguous_simple.h5" ) . exists ( ) {
1818 std:: fs:: create_dir_all ( & dir) . unwrap ( ) ;
1919 let script = manifest. join ( "tests" ) . join ( "generate_hdf5_fixtures.py" ) ;
20- let python = manifest. join ( ".venv" ) . join ( "bin" ) . join ( "python" ) ;
20+ let venv_python = manifest. join ( ".venv" ) . join ( "bin" ) . join ( "python" ) ;
21+ let python = if venv_python. exists ( ) {
22+ venv_python
23+ } else {
24+ PathBuf :: from ( "python3" )
25+ } ;
2126 let status = std:: process:: Command :: new ( & python)
2227 . arg ( & script)
2328 . arg ( & dir)
2429 . status ( )
25- . expect ( "Failed to run h5py fixture generator" ) ;
30+ . expect ( "Failed to run h5py fixture generator (need python3 with h5py) " ) ;
2631 assert ! ( status. success( ) , "h5py fixture generator failed" ) ;
2732 }
2833 } ) ;
You can’t perform that action at this time.
0 commit comments