test_sampling_examples.py 485 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import subprocess
import sys

EXAMPLE_ROOT = os.path.join(
    os.path.dirname(os.path.relpath(__file__)),
    "..",
    "..",
    "examples",
    "sampling",
    "graphbolt",
    "quickstart",
)


16
17
def test_node_classification():
    script = os.path.join(EXAMPLE_ROOT, "node_classification.py")
18
19
20
    out = subprocess.run(["python", str(script)], capture_output=True)
    assert out.returncode == 0
    stdout = out.stdout.decode("utf-8")
21
    assert float(stdout[-5:]) > 0.60