Skip to content

Commit

Permalink
upd test
Browse files Browse the repository at this point in the history
  • Loading branch information
kshpv committed Dec 13, 2024
1 parent c352866 commit bed46b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/common/test_statistics_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# limitations under the License.
import pytest

import nncf
from nncf.common.tensor_statistics.statistics_validator import validate_backend
from nncf.common.utils.backend import BackendType

Expand All @@ -23,12 +22,12 @@ def test_validate_backend(backend_value):

validate_backend(data, backend)

with pytest.raises(nncf.ValidationError) as exc_info:
with pytest.raises(ValueError) as exc_info:
# Test case where backend does not match
validate_backend({"backend": BackendType.ONNX.value}, BackendType.TORCH)
assert "Backend in loaded statistics ONNX does not match to an expected backend Torch." in str(exc_info)
assert "Backend in loaded statistics" in str(exc_info)

with pytest.raises(nncf.ValidationError) as exc_info:
with pytest.raises(ValueError) as exc_info:
# Test case where backend key is missing
validate_backend({}, BackendType.TORCH)
assert "The provided metadata has no information about backend." in str(exc_info)

0 comments on commit bed46b9

Please sign in to comment.