Skip to content

Commit

Permalink
Add tests: load_mtz_cctbx
Browse files Browse the repository at this point in the history
  • Loading branch information
speleo3 committed Sep 30, 2023
1 parent 50c89f6 commit a4f86e5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file added tests/data/5e5z_phases.mtz
Binary file not shown.
24 changes: 24 additions & 0 deletions tests/test_load_mtz_cctbx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import psico.load_mtz_cctbx as m
import importlib.util
import pytest
from pathlib import Path
from pymol import cmd

DATA_PATH = Path(__file__).resolve().parent / 'data'


def test_load_mtz_cctbx():
cmd.reinitialize()

if importlib.util.find_spec("iotbx") is None:
pytest.skip("cctbx not found")

m.load_mtz_cctbx(DATA_PATH / "5e5z_phases.mtz")

assert set(cmd.get_names()) == {
'5e5z_phases_FC_ALL_LS_PHIC_ALL_LS',
'5e5z_phases_DELFWT_PHDELWT',
'5e5z_phases_FWT_PHWT',
'5e5z_phases_FC_ALL_PHIC_ALL',
'5e5z_phases_FC_PHIC',
}

0 comments on commit a4f86e5

Please sign in to comment.