mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-16 16:27:45 +01:00
fix: migrate to unittest.assertNotEqual (#1350)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
committed by
suluyan
parent
41e924dc4f
commit
411cf0c13c
@@ -63,7 +63,7 @@ class LlamafileCMDTest(unittest.TestCase):
|
|||||||
cmd = f'python -m modelscope.cli.cli {self.cmd} --model {self.model_id} --file {file} --accuracy {accuracy}'
|
cmd = f'python -m modelscope.cli.cli {self.cmd} --model {self.model_id} --file {file} --accuracy {accuracy}'
|
||||||
stat, output = subprocess.getstatusoutput(cmd)
|
stat, output = subprocess.getstatusoutput(cmd)
|
||||||
# cannot provide accuracy and file at the same time
|
# cannot provide accuracy and file at the same time
|
||||||
self.assertNotEquals(stat, 0)
|
self.assertNotEqual(stat, 0)
|
||||||
|
|
||||||
def test_no_match_llamafile(self):
|
def test_no_match_llamafile(self):
|
||||||
accuracy = 'not-exist'
|
accuracy = 'not-exist'
|
||||||
@@ -79,7 +79,7 @@ class LlamafileCMDTest(unittest.TestCase):
|
|||||||
cmd = f'python -m modelscope.cli.cli {self.cmd} --model {self.invalid_model_id}'
|
cmd = f'python -m modelscope.cli.cli {self.cmd} --model {self.invalid_model_id}'
|
||||||
stat, output = subprocess.getstatusoutput(cmd)
|
stat, output = subprocess.getstatusoutput(cmd)
|
||||||
print(output)
|
print(output)
|
||||||
self.assertNotEquals(stat, 0)
|
self.assertNotEqual(stat, 0)
|
||||||
self.assertTrue('Cannot locate a valid llamafile in repo' in output)
|
self.assertTrue('Cannot locate a valid llamafile in repo' in output)
|
||||||
|
|
||||||
def test_no_execution(self):
|
def test_no_execution(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user