Skip to content

Commit

Permalink
Fix create tmp file in pytorch test_failed_extension test
Browse files Browse the repository at this point in the history
  • Loading branch information
praasz committed Jul 2, 2024
1 parent 69b60aa commit 07715ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/layer_tests/ovc_python_api_tests/test_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,11 +1181,13 @@ def relu_bad(n):

def test_failed_extension(self):
import tempfile
import os
from openvino.tools.ovc import convert_model

with self.assertRaisesRegex(Exception, ".*Cannot recognize input model.*"):
with tempfile.NamedTemporaryFile() as tmpfile:
with tempfile.NamedTemporaryFile(delete=False) as tmpfile:
convert_model(tmpfile.name)
os.remove(tmpfile.name)


def create_model_three_inputs():
Expand Down

0 comments on commit 07715ea

Please sign in to comment.