Skip to content

Commit

Permalink
Reverted all changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LazeringDeath committed Jul 24, 2024
1 parent 3a67591 commit c73bb40
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ def __init__(
raise RuntimeError(f"File does not exist. {service_config_path}")

with open(service_config_path) as service_config_file:
try:
service_config = json.loads(service_config_file.read())
except json.decoder.JSONDecodeError:
raise NameError(f"Invalid character(s) in {service_config_path}")
service_config = json.load(service_config_file)

if service_class is None:
service = next(iter(service_config["services"]), None)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions packages/service/tests/unit/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,31 +426,6 @@ def test___service_config___create_measurement_service___service_info_matches_se
assert measurement_service.service_info.annotations == provided_annotations


@pytest.mark.parametrize(
"service_config",
[
"example.ErrorDisplayName.serviceconfig",
"example.ErrorAnnotations.serviceconfig",
"example.ErrorTags.serviceconfig",
"example.ErrorCollections.serviceconfig",
],
)
def test___service_config___check_service_config___name_error_exception(
test_assets_directory: pathlib.Path,
service_config: str,
):
try:
MeasurementService(
service_config_path=test_assets_directory / f"check_char/{service_config}",
version="1.0.0.0",
ui_file_paths=[],
)
error_occurred = False
except NameError:
error_occurred = True
assert error_occurred


@pytest.mark.parametrize(
"display_name,type,default_value,enum_type",
[
Expand Down

0 comments on commit c73bb40

Please sign in to comment.