Skip to content
Snippets Groups Projects
Commit bb5d6dbc authored by ThanKarab's avatar ThanKarab
Browse files

Renamed the 'histogram' algorithm to 'multiple_histograms'.

parent 3922c528
No related branches found
No related tags found
No related merge requests found
{ {
"name": "histogram", "name": "multiple_histograms",
"desc": "Multiple Histograms", "desc": "Multiple Histograms",
"label": "Multiple Histograms", "label": "Multiple Histograms",
"enabled": true, "enabled": true,
......
...@@ -4,15 +4,16 @@ from pathlib import Path ...@@ -4,15 +4,16 @@ from pathlib import Path
import pytest import pytest
from tests.algorithm_validation_tests.helpers import algorithm_request from tests.algorithm_validation_tests.helpers import algorithm_request
from tests.algorithm_validation_tests.helpers import assert_allclose
from tests.algorithm_validation_tests.helpers import get_test_params from tests.algorithm_validation_tests.helpers import get_test_params
expected_file = Path(__file__).parent / "expected" / "histogram_expected.json" algorithm_name = "multiple_histograms"
expected_file = Path(__file__).parent / "expected" / f"{algorithm_name}_expected.json"
@pytest.mark.parametrize("test_input, expected", get_test_params(expected_file)) @pytest.mark.parametrize("test_input, expected", get_test_params(expected_file))
def test_histogram(test_input, expected): def test_histogram(test_input, expected):
response = algorithm_request("histogram", test_input) response = algorithm_request(algorithm_name, test_input)
try: try:
result = json.loads(response.text) result = json.loads(response.text)
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
......
...@@ -4,15 +4,16 @@ from pathlib import Path ...@@ -4,15 +4,16 @@ from pathlib import Path
import pytest import pytest
from tests.algorithm_validation_tests.helpers import algorithm_request from tests.algorithm_validation_tests.helpers import algorithm_request
from tests.algorithm_validation_tests.helpers import assert_allclose
from tests.algorithm_validation_tests.helpers import get_test_params from tests.algorithm_validation_tests.helpers import get_test_params
expected_file = Path(__file__).parent / "expected" / "histogram_expected.json" algorithm_name = "multiple_histograms"
expected_file = Path(__file__).parent / "expected" / f"{algorithm_name}_expected.json"
@pytest.mark.parametrize("test_input, expected", get_test_params(expected_file)) @pytest.mark.parametrize("test_input, expected", get_test_params(expected_file))
def test_histogram(test_input, expected): def test_histogram(test_input, expected):
response = algorithm_request("histogram", test_input) response = algorithm_request(algorithm_name, test_input)
try: try:
result = json.loads(response.text) result = json.loads(response.text)
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment