Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
elinscott committed Oct 11, 2024
1 parent ae87b90 commit 3b3c3a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/helpers/patches/_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@ def monkeypatch_bench(monkeypatch):
patch_calculator(c, monkeypatch)

for p in [Bin2XMLProcess, ComputePowerSpectrumProcess, ConvertFilesFromSpin1To2, ConvertFilesFromSpin2To1,
ExtractCoefficientsFromXMLProcess, UnfoldAndInterpolateProcess, ExtendProcess, MergeProcess, MergeEVCProcess]:
ExtractCoefficientsFromXMLProcess, UnfoldAndInterpolateProcess, ExtendProcess, MergeProcess,
MergeEVCProcess]:
patch_process(p, monkeypatch)
7 changes: 5 additions & 2 deletions tests/helpers/patches/_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def monkeypatch_mock(monkeypatch):
from koopmans.processes.wannier import ExtendProcess, MergeProcess

# Replace calculators with mock versions that obtain results from the database
for c in [KoopmansCPCalculator, Wannier90Calculator, PW2WannierCalculator, Wann2KCPCalculator, PhCalculator, PWCalculator, KoopmansCPCalculator, EnvironCalculator, Wann2KCCalculator, KoopmansScreenCalculator, KoopmansHamCalculator, ProjwfcCalculator]:
for c in [KoopmansCPCalculator, Wannier90Calculator, PW2WannierCalculator, Wann2KCPCalculator, PhCalculator,
PWCalculator, KoopmansCPCalculator, EnvironCalculator, Wann2KCCalculator, KoopmansScreenCalculator,
KoopmansHamCalculator, ProjwfcCalculator]:
monkeypatch.setattr(c, '_calculate', mock_calculator__calculate)
monkeypatch.setattr(c, 'is_complete', mock_calculator_is_complete)
monkeypatch.setattr(c, 'check_code_is_installed', mock_calculator_check_code_is_installed)
Expand All @@ -185,7 +187,8 @@ def monkeypatch_mock(monkeypatch):
# monkeypatch.setattr(c, 'generate_band_structure', mock_generate_band_structure)

# Processes
for p in [ExtractCoefficientsFromXMLProcess, ComputePowerSpectrumProcess, Bin2XMLProcess, ConvertFilesFromSpin1To2, ConvertFilesFromSpin2To1, ExtendProcess, MergeProcess, UnfoldAndInterpolateProcess, MergeEVCProcess]:
for p in [ExtractCoefficientsFromXMLProcess, ComputePowerSpectrumProcess, Bin2XMLProcess, ConvertFilesFromSpin1To2,
ConvertFilesFromSpin2To1, ExtendProcess, MergeProcess, UnfoldAndInterpolateProcess, MergeEVCProcess]:
monkeypatch.setattr(p, '_run', mock_process_run)

# Patch the Atoms class
Expand Down

0 comments on commit 3b3c3a4

Please sign in to comment.