examples for the modelscope install method > modelscope install adaseq ofasys > modelscope install git+https://github.com/modelscope/AdaSeq.git > modelscope install adaseq -i -f > modelscope install adaseq --extra-index-url --trusted-host <h
(self)
| 55 | assert MODELS.get('dummy-model', 'dummy-group') is not None |
| 56 | |
| 57 | def test_install_plugins(self): |
| 58 | """ |
| 59 | examples for the modelscope install method |
| 60 | > modelscope install adaseq ofasys |
| 61 | > modelscope install git+https://github.com/modelscope/AdaSeq.git |
| 62 | > modelscope install adaseq -i <url> -f <url> |
| 63 | > modelscope install adaseq --extra-index-url <url> --trusted-host <hostname> |
| 64 | """ |
| 65 | install_args = [self.package] |
| 66 | status_code, install_args = self.plugins_manager.install_plugins( |
| 67 | install_args) |
| 68 | self.assertEqual(status_code, 0) |
| 69 | |
| 70 | install_args = ['random_blabla'] |
| 71 | status_code, install_args = self.plugins_manager.install_plugins( |
| 72 | install_args) |
| 73 | self.assertEqual(status_code, 1) |
| 74 | |
| 75 | install_args = [self.package, 'random_blabla'] |
| 76 | status_code, install_args = self.plugins_manager.install_plugins( |
| 77 | install_args) |
| 78 | self.assertEqual(status_code, 1) |
| 79 | |
| 80 | # move this from tear down to avoid unexpected uninstall |
| 81 | uninstall_args = [self.package, '-y'] |
| 82 | self.plugins_manager.uninstall_plugins(uninstall_args) |
| 83 | |
| 84 | @unittest.skip |
| 85 | def test_install_plugins_with_git(self): |
nothing calls this directly
no test coverage detected