File: test_report_text.py

package info (click to toggle)
finalcif 113%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 42,568 kB
  • sloc: python: 44,669; sh: 79; makefile: 24
file content (25 lines) | stat: -rw-r--r-- 978 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from unittest import TestCase

from docx import Document

from finalcif.cif.cif_file_io import CifContainer
from finalcif.report.report_text import Hydrogens, MachineType


class TestMachineType(TestCase):

    def test__get_cooling_device_iucr(self):
        cif = CifContainer('tests/statics/temp_device_iucr.cif')
        self.assertEqual('Oxford Cryostream 850 ', MachineType._get_cooling_device(cif))

    def test__get_cooling_device_olx(self):
        cif = CifContainer('tests/statics/temp_device_olx.cif')
        self.assertEqual('Oxford Cryostream 810 ', MachineType._get_cooling_device(cif))

    def test__get_cooling_device_both(self):
        cif = CifContainer('tests/statics/temp_device_both.cif')
        self.assertEqual('Oxford Cryostream 900 ', MachineType._get_cooling_device(cif))

    def test__get_no_cooling_device(self):
        cif = CifContainer('tests/statics/temp_no_device.cif')
        self.assertEqual('', MachineType._get_cooling_device(cif))