-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add remove command for remove TVM project
- Loading branch information
Showing
8 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/environment_manager/application/test_tutor_project_remover.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pytest | ||
|
||
from tests.environment_manager.infrastructure.environment_manager_in_memory_repository import ( | ||
EnvironmentManagerInMemoryRepository, | ||
) | ||
from tvm.environment_manager.application.tutor_project_remover import ( | ||
TutorProjectRemover, | ||
) | ||
|
||
|
||
def test_should_remove_tutor_project(): | ||
# Given | ||
repository = EnvironmentManagerInMemoryRepository() | ||
|
||
# When | ||
remove = TutorProjectRemover(repository=repository) | ||
remove() | ||
|
||
# Then | ||
assert repository.PROJECT_NAME == [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tvm/environment_manager/application/tutor_project_remover.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Tutor project initialize.""" | ||
from tvm.environment_manager.domain.environment_manager_repository import EnvironmentManagerRepository | ||
|
||
|
||
class TutorProjectRemover: | ||
"""Tutor project initialize for environment manager.""" | ||
|
||
def __init__(self, repository: EnvironmentManagerRepository) -> None: | ||
"""init.""" | ||
self.repository = repository | ||
|
||
def __call__(self) -> None: | ||
"""call.""" | ||
self.repository.project_remover() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters