forked from scatseisnet/scatseisnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_basic.py
More file actions
37 lines (26 loc) · 960 Bytes
/
test_basic.py
File metadata and controls
37 lines (26 loc) · 960 Bytes
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
import subprocess
#minimum python 3.7+
def test_inventory():
p = subprocess.run(["scatseisnet", "inventory", "--datapath", "./tests/data/YH.DC06..BH{channel}_{tag}.sac"], capture_output=True, text=True)
stdout = p.stdout
stderr = p.stderr
assert "saved" in stdout
assert "Error" not in stderr
def test_transform():
p = subprocess.run(["scatseisnet", "transform"], capture_output=True, text=True)
stdout = p.stdout
stderr = p.stderr
assert "Saved" in stdout
assert "Error" not in stderr
def test_features():
p = subprocess.run(["scatseisnet", "features"], capture_output=True, text=True)
stdout = p.stdout
stderr = p.stderr
assert "Saved" in stdout
assert "Error" not in stderr
def test_linkage():
p = subprocess.run(["scatseisnet", "linkage"], capture_output=True, text=True)
stdout = p.stdout
stderr = p.stderr
assert "Saved" in stdout
assert "Error" not in stderr