[Debichem-devel] Bug#1030722: python3-pymatgen: WavecarTest.test_get_parchg fails on most arches
Drew Parsons
dparsons at debian.org
Mon Feb 6 18:52:46 GMT 2023
Package: python3-pymatgen
Version: 2022.11.7+dfsg1-2
Severity: normal
WavecarTest.test_get_parchg (io/vasp/tests/test_outputs.py) fails on
many arches. Oddly, it passes on armel and armhf (and, less
surpirisingly, amd64).
The ubiquity of the error suggests it's a specific code problem that
can be fixed. So report upstream if it still occurs with the latest
upstream version (which we don't have just yet).
The error is:
_________________________ WavecarTest.test_get_parchg __________________________
self = <vasp.tests.test_outputs.WavecarTest testMethod=test_get_parchg>
def test_get_parchg(self):
poscar = Poscar.from_file(self.TEST_FILES_DIR / "POSCAR")
w = self.w
c = w.get_parchg(poscar, 0, 0, spin=0, phase=False)
self.assertTrue("total" in c.data)
self.assertTrue("diff" not in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng * 2))
self.assertTrue(np.all(c.data["total"] > 0.0))
c = w.get_parchg(poscar, 0, 0, spin=0, phase=True)
self.assertTrue("total" in c.data)
self.assertTrue("diff" not in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng * 2))
self.assertFalse(np.all(c.data["total"] > 0.0))
w = Wavecar(self.TEST_FILES_DIR / "WAVECAR.N2.spin")
c = w.get_parchg(poscar, 0, 0, phase=False, scale=1)
self.assertTrue("total" in c.data)
self.assertTrue("diff" in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng))
self.assertTrue(np.all(c.data["total"] > 0.0))
self.assertFalse(np.all(c.data["diff"] > 0.0))
c = w.get_parchg(poscar, 0, 0, spin=0, phase=False)
self.assertTrue("total" in c.data)
self.assertTrue("diff" not in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng * 2))
self.assertTrue(np.all(c.data["total"] > 0.0))
c = w.get_parchg(poscar, 0, 0, spin=0, phase=True)
self.assertTrue("total" in c.data)
self.assertTrue("diff" not in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng * 2))
self.assertFalse(np.all(c.data["total"] > 0.0))
w = self.w_ncl
w.coeffs.append([np.ones((2, 100))])
c = w.get_parchg(poscar, -1, 0, phase=False, spinor=None)
self.assertTrue("total" in c.data)
self.assertTrue("diff" not in c.data)
self.assertEqual(np.prod(c.data["total"].shape), np.prod(w.ng * 2))
> self.assertFalse(np.all(c.data["total"] > 0.0))
E AssertionError: True is not false
/<<PKGBUILDDIR>>/.pybuild/test_python3.11/pymatgen/io/vasp/tests/test_outputs.py:2107: AssertionError
More information about the Debichem-devel
mailing list