Skip to content

Commit

Permalink
Add more test case
Browse files Browse the repository at this point in the history
  • Loading branch information
harimkang committed Mar 15, 2024
1 parent 2f6f9f2 commit 2698d1b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/unit/engine/test_engine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import pytest
from otx.engine import Engine


Expand All @@ -26,3 +27,12 @@ def test_from_config_with_model_name(self, tmp_path) -> None:
assert engine is not None
assert engine.datamodule.config.train_subset.batch_size == 2
assert engine.datamodule.config.test_subset.subset_name == "TESTING"

with pytest.raises(FileNotFoundError):
engine = Engine.from_model_name(
model_name="wrong_model",
data_root=data_root,
task=task_type,
work_dir=tmp_path,
**overriding,
)

0 comments on commit 2698d1b

Please sign in to comment.