coverage85-step2d: 新测试 lint 清理(删无用导入与变量)
This commit is contained in:
1 parent
1e9c1b36ee
commit
903f138fd9
4 files changed
+2
-5
No files matched your search
@@ -304,7 +304,6 @@ class Server2TestCase(unittest.TestCase):
|
|||||||
self.assertEqual(status, 400)
|
self.assertEqual(status, 400)
|
||||||
|
|
||||||
def test_create_task_valid_variants(self):
|
def test_create_task_valid_variants(self):
|
||||||
pid = self.project["id"]
|
|
||||||
task = self._create_task(self.owner_key, depends_on="dep-1")
|
task = self._create_task(self.owner_key, depends_on="dep-1")
|
||||||
self.assertEqual(task["depends_on"], ["dep-1"])
|
self.assertEqual(task["depends_on"], ["dep-1"])
|
||||||
task = self._create_task(self.owner_key, prompt="/goal 收邮件")
|
task = self._create_task(self.owner_key, prompt="/goal 收邮件")
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import io
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tarfile
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from contextlib import redirect_stderr, redirect_stdout
|
from contextlib import redirect_stderr, redirect_stdout
|
||||||
@@ -341,7 +340,7 @@ class DeployMainTest(unittest.TestCase):
|
|||||||
|
|
||||||
def test_git_dry_run_via_main(self):
|
def test_git_dry_run_via_main(self):
|
||||||
with tempfile.TemporaryDirectory() as tmp:
|
with tempfile.TemporaryDirectory() as tmp:
|
||||||
head = _make_git_repo(tmp)
|
_make_git_repo(tmp)
|
||||||
old_root = deploy_mod.REPO_ROOT
|
old_root = deploy_mod.REPO_ROOT
|
||||||
deploy_mod.REPO_ROOT = tmp
|
deploy_mod.REPO_ROOT = tmp
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ sys.path.insert(0, str(REPO_ROOT))
|
|||||||
_SPEC = importlib.util.spec_from_file_location(
|
_SPEC = importlib.util.spec_from_file_location(
|
||||||
"verify_multiuser",
|
"verify_multiuser",
|
||||||
os.path.join(REPO_ROOT, "deploy", "verify-multiuser.py"))
|
os.path.join(REPO_ROOT, "deploy", "verify-multiuser.py"))
|
||||||
|
assert _SPEC is not None and _SPEC.loader is not None
|
||||||
vm = importlib.util.module_from_spec(_SPEC)
|
vm = importlib.util.module_from_spec(_SPEC)
|
||||||
_SPEC.loader.exec_module(vm)
|
_SPEC.loader.exec_module(vm)
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,8 @@ sys.path.insert(0, str(REPO_ROOT))
|
|||||||
|
|
||||||
import host
|
import host
|
||||||
from host import (
|
from host import (
|
||||||
Server,
|
|
||||||
dispatch,
|
dispatch,
|
||||||
dispatch_from_branch,
|
dispatch_from_branch,
|
||||||
make_worktree,
|
|
||||||
merge_task,
|
merge_task,
|
||||||
notify_failure,
|
notify_failure,
|
||||||
run_goal_loop,
|
run_goal_loop,
|
||||||
|
|||||||
Reference in new issue
Block a user