def test_write_chgcar(self): calc, inp = self._get_calc() calc.write_chgcar(inp, self.tmpf) with open(self.tmpf, 'r') as chg: res = chg.read() self.assertEquals(res, Common.charge_density_res())