test_simulation.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:lattice_mc 作者: bjmorgan 项目源码 文件源码
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 )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号