File: test_plot_Fo_vs_Fc.py

package info (click to toggle)
dials 3.25.0%2Bdfsg3-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 20,112 kB
  • sloc: python: 134,740; cpp: 34,526; makefile: 160; sh: 142
file content (17 lines) | stat: -rw-r--r-- 500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from __future__ import annotations

from dials.command_line import plot_Fo_vs_Fc


def test(dials_data, tmp_path, capsys):
    mtz_file = (
        dials_data("lysozyme_electron_diffraction", pathlib=True) / "refmac_final.mtz"
    )
    plot_file = tmp_path / "Fo_vs_Fc.pdf"
    plot_Fo_vs_Fc.run(
        [f"hklin={mtz_file}", f"plot_filename={plot_file}"],
    )
    captured = capsys.readouterr()
    assert not captured.err
    assert plot_file.is_file()
    assert "|Fe| = 42.0" in captured.out