-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathtest_reader.py
More file actions
69 lines (51 loc) · 1.76 KB
/
Copy pathtest_reader.py
File metadata and controls
69 lines (51 loc) · 1.76 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import sys
from XCaliburMethodReader import main
testfile = 'data/test.meth'
def test_parser_accepts_file(capsys):
args = (testfile,)
main(args)
captured = capsys.readouterr()
assert 'Proxeon' in captured.out
assert 'Thermo Exactive' in captured.out
def test_thermo_data_text(capsys):
args = testfile, '-s', 'Thermo Exactive'
main(args)
captured = capsys.readouterr()
assert 'Method' in captured.out
args = testfile, '-s', 'Thermo Exactive', '--to', 'text'
main(args)
captured = capsys.readouterr()
assert 'Method' in captured.out
def test_thermo_data_json(capsys):
args = testfile, '-s', 'Thermo Exactive', '--to', 'json'
main(args)
captured = capsys.readouterr()
assert captured.out[0] == '{'
assert captured.out.strip()[-1] == '}'
def test_thermo_data_xml(capsys):
args = testfile, '-s', 'Thermo Exactive', '--to', 'xml'
main(args)
captured = capsys.readouterr()
assert captured.out[:5] == '<?xml'
assert captured.out.strip()[-1] == '>'
def test_ms_data_text(capsys):
args = testfile, '-s', 'Proxeon_EASY-nLC'
main(args)
captured = capsys.readouterr()
assert 'Sample' in captured.out
args = testfile, '-s', 'Proxeon_EASY-nLC', '--to', 'text'
main(args)
captured = capsys.readouterr()
assert 'Sample' in captured.out
def test_ms_data_json(capsys):
args = testfile, '-s', 'Proxeon_EASY-nLC', '--to', 'json'
main(args)
captured = capsys.readouterr()
assert captured.out[0] == '{'
assert captured.out.strip()[-1] == '}'
def test_ms_data_xml(capsys):
args = testfile, '-s', 'Proxeon_EASY-nLC', '--to', 'xml'
main(args)
captured = capsys.readouterr()
assert captured.out[:5] == '<?xml'
assert captured.out.strip()[-1] == '>'