Coverage for gpaw/test/sjm/test_constpot.py: 38%
8 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-09 00:21 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-09 00:21 +0000
1import pytest
4@pytest.mark.old_gpaw_only
5# @pytest.mark.ci maybe
6def test_constpot(atoms):
7 atoms.calc.set(sj={'tol': 0.5})
8 atoms.get_forces()
10 pot = atoms.calc.parameters['sj']['target_potential']
11 tol = atoms.calc.parameters['sj']['tol']
12 assert abs(atoms.calc.get_electrode_potential() - pot) < tol