def test_io_with_unsupported_format(self):
     sim = Simulator(N=1024)
     with pytest.raises(KeyError):
         sim.write('sim.hdf5', format_='hdf5')
     with pytest.raises(KeyError):
         sim.write('sim.pickle', format_='pickle')
         sim.read('sim.pickle', format_='hdf5')
     os.remove('sim.pickle')
Beispiel #2
0
 def test_io_with_unsupported_format(self):
     sim = Simulator(N=self.N, dt=self.dt, rms=self.rms, mean=self.mean)
     with pytest.raises(KeyError):
         sim.write('sim.hdf5', format_='hdf5')
     with pytest.raises(KeyError):
         sim.write('sim.pickle', format_='pickle')
         sim.read('sim.pickle', format_='hdf5')
     os.remove('sim.pickle')
Beispiel #3
0
 def test_io(self):
     sim = Simulator(N=self.N, dt=self.dt, rms=self.rms, mean=self.mean)
     sim.write('sim.pickle')
     sim = sim.read('sim.pickle')
     assert sim.N == self.N
     os.remove('sim.pickle')
 def test_io(self):
     sim = Simulator(N=1024)
     sim.write('sim.pickle')
     sim = sim.read('sim.pickle')
     assert sim.N == 1024
     os.remove('sim.pickle')