diff --git a/tests/main/test_api.py b/tests/main/test_api.py new file mode 100644 index 00000000..24859776 --- /dev/null +++ b/tests/main/test_api.py @@ -0,0 +1,24 @@ +# Test the zigzag api call +import pytest + +from zigzag.api import get_hardware_performance_zigzag + + +@pytest.fixture +def workload(): + return "zigzag/inputs/examples/workload/mobilenetv2.onnx" + + +@pytest.fixture +def mapping(): + return "zigzag.inputs.examples.mapping.tpu_like" + + +@pytest.fixture +def accelerator(): + return "zigzag.inputs.examples.hardware.TPU_like" + + +def test_api(workload, mapping, accelerator): + answer = get_hardware_performance_zigzag(workload, accelerator, mapping) + assert answer diff --git a/tests/main/test_main_onnx.py b/tests/main/test_main_onnx.py deleted file mode 100644 index 505717c0..00000000 --- a/tests/main/test_main_onnx.py +++ /dev/null @@ -1,9 +0,0 @@ -# sample test - - -def capital_case(x): - return x.capitalize() - - -def test_capital_case(): - assert capital_case("zigzag") == "Zigzag"