• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kit-data-manager / tomo_mapper / 16725814017

04 Aug 2025 02:09PM UTC coverage: 86.311% (-3.3%) from 89.629%
16725814017

push

github

web-flow
Release v1.1.0

350 of 449 new or added lines in 22 files covered. (77.95%)

9 existing lines in 2 files now uncovered.

2396 of 2776 relevant lines covered (86.31%)

0.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.75
/tests/parser_tests/test_txtparser.py
1
import glob
1✔
2
import os
1✔
3
from pprint import pprint
1✔
4

5
import pytest
1✔
6

7
from src.config import MappingConfig
1✔
8
from src.parser.ImageParser import ParserMode
1✔
9
from src.parser.impl.TxtParser import TxtParser
1✔
10
from src.resources.maps.mapping import textparser_sem_tescan, textparser_sem_jeol
1✔
11
from src.util import load_json, input_to_dict
1✔
12

13

14
class TestTXTparser:
1✔
15

16
    def test_sem_tescan(self):
1✔
17
        parser = TxtParser(ParserMode.SEM)
1✔
18

19
        MappingConfig.set_working_dir("/")
1✔
20
        dir_to_testscript = os.path.split(__file__)[0]
1✔
21

22
        tesc_glob = glob.glob(os.path.normpath(os.path.join(dir_to_testscript, "../sampleData/images/SEM/TESCAN/*.hdr")))
1✔
23
        if len(tesc_glob) == 0:
1✔
NEW
24
            pytest.skip("Test files not included, skipping test")
×
25

26
        mapping_dict = input_to_dict(textparser_sem_tescan.read_text())
1✔
27

28
        for zg in tesc_glob:
1✔
29
            img, raw = parser.parse(zg, mapping_dict)
1✔
30
            #pprint(raw)
31

32
            pprint(img.image_metadata.to_schema_dict())
1✔
33

34
    def test_sem_jeol(self):
1✔
35
        parser = TxtParser(ParserMode.SEM)
1✔
36

37
        MappingConfig.set_working_dir("/")
1✔
38
        dir_to_testscript = os.path.split(__file__)[0]
1✔
39

40
        tesc_glob = glob.glob(os.path.normpath(os.path.join(dir_to_testscript, "../sampleData/images/SEM/JEOL/*.txt")))
1✔
41
        if len(tesc_glob) == 0:
1✔
NEW
42
            pytest.skip("Test files not included, skipping test")
×
43

44
        mapping_dict = input_to_dict(textparser_sem_jeol.read_text())
1✔
45

46
        for zg in tesc_glob:
1✔
47
            img, raw = parser.parse(zg, mapping_dict)
1✔
48
            #pprint(raw)
49

50
            pprint(img.image_metadata.to_schema_dict())
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc