def test_collective_diffusion_coefficient_per_atom( self ):
s = self.simulation
with patch( 'lattice_mc.simulation.Simulation.collective_diffusion_coefficient', new_callable=PropertyMock ) as mock_cdc:
mock_cdc.return_value = 8.0
s.number_of_atoms = 2
self.assertEqual( s.collective_diffusion_coefficient_per_atom, 4.0 )
评论列表
文章目录