change: make startproject as hrun sub-command, usage: hrun startproject <project_name>

This commit is contained in:
debugtalk
2020-04-12 16:56:19 +08:00
parent 4a50c4b583
commit 2f73d5021b
6 changed files with 206 additions and 160 deletions

View File

@@ -1,6 +1,5 @@
import io
import os
import shutil
import unittest
from httprunner import exceptions, loader, utils
@@ -210,17 +209,6 @@ class TestUtils(unittest.TestCase):
self.assertEqual(id(new_data["c"]), id(data["c"]))
# self.assertEqual(id(new_data["d"]), id(data["d"]))
def test_create_scaffold(self):
project_name = "projectABC"
utils.create_scaffold(project_name)
self.assertTrue(os.path.isdir(os.path.join(project_name, "api")))
self.assertTrue(os.path.isdir(os.path.join(project_name, "testcases")))
self.assertTrue(os.path.isdir(os.path.join(project_name, "testsuites")))
self.assertTrue(os.path.isdir(os.path.join(project_name, "reports")))
self.assertTrue(os.path.isfile(os.path.join(project_name, "debugtalk.py")))
self.assertTrue(os.path.isfile(os.path.join(project_name, ".env")))
shutil.rmtree(project_name)
def test_cartesian_product_one(self):
parameters_content_list = [
[