fix: ensure generated conftest.py located in generated pytest folder

This commit is contained in:
debugtalk
2020-06-06 22:13:59 +08:00
parent 6de4de8b2f
commit b400060aca
6 changed files with 74 additions and 70 deletions

View File

@@ -8,7 +8,6 @@ from httprunner.make import (
make_config_chain_style,
make_teststep_chain_style,
pytest_files_run_set,
ensure_file_path_valid,
)
@@ -67,34 +66,6 @@ from examples.postman_echo.request_methods.request_with_functions_test import (
testcase_python_list,
)
def test_ensure_file_path_valid(self):
self.assertEqual(
ensure_file_path_valid(
"examples/postman-echo/request.methods/hardcode.yml"
),
os.path.join(
os.getcwd(), "examples/postman_echo/request_methods/hardcode.yml"
),
)
self.assertEqual(
ensure_file_path_valid(
os.path.join(os.getcwd(), "postman-echo/request.methods/hardcode.yml")
),
os.path.join(os.getcwd(), "postman_echo/request_methods/hardcode.yml"),
)
self.assertEqual(
ensure_file_path_valid(
"examples/postman echo/request methods/hardcode.yml"
),
os.path.join(
os.getcwd(), "examples/postman_echo/request_methods/hardcode.yml"
),
)
self.assertEqual(
ensure_file_path_valid("1/2B/3.yml"),
os.path.join(os.getcwd(), "T1/T2B/T3.yml"),
)
def test_convert_testcase_path(self):
self.assertEqual(
convert_testcase_path("mubu.login.yml"),