def test_pxrd_plot(self):
    structure = res2dict((REAL_PATH + 'data/res_files/KPSn-OQMD_123456.res'), as_model=True)[0]
    plot_pxrd(structure, png=True)
    self.assertTrue(os.path.isfile('K7PSn_pxrd.png'))
    plot_pdf([structure, structure], filename='test_pxrd', png=True)
    self.assertTrue(os.path.isfile('test_pxrd.png'))
def test_pxrd_plot(self):
    structure = res2dict((REAL_PATH + 'data/res_files/KPSn-OQMD_123456.res'), as_model=True)[0]
    plot_pxrd(structure, png=True)
    self.assertTrue(os.path.isfile('K7PSn_pxrd.png'))
    plot_pdf([structure, structure], filename='test_pxrd', png=True)
    self.assertTrue(os.path.isfile('test_pxrd.png'))