(self)
| 665 | @pytest.mark.skipif("native" not in ct.hdf_support(), |
| 666 | reason="Cantera compiled without HDF support") |
| 667 | def test_write_hdf(self): |
| 668 | outfile = self.test_work_path / "solutionarray_fancy.h5" |
| 669 | outfile.unlink(missing_ok=True) |
| 670 | |
| 671 | extra = {'foo': range(7), 'bar': range(7)} |
| 672 | meta = {'spam': 'eggs', 'hello': 'world'} |
| 673 | states = ct.SolutionArray(self.gas, 7, extra=extra, meta=meta) |
| 674 | states.TPX = np.linspace(300, 1000, 7), 2e5, 'H2:0.5, O2:0.4' |
| 675 | states.equilibrate('HP') |
| 676 | |
| 677 | states.save(outfile, "group0") |
| 678 | |
| 679 | b = ct.SolutionArray(self.gas) |
| 680 | attr = b.restore(outfile, "group0") |
| 681 | self.check_arrays(states, b) |
| 682 | |
| 683 | @pytest.mark.skipif("native" not in ct.hdf_support(), |
| 684 | reason="Cantera compiled without HDF support") |
nothing calls this directly
no test coverage detected