diff --git a/.gitignore b/.gitignore index 37082eeea8..8b0cf45780 100644 --- a/.gitignore +++ b/.gitignore @@ -212,7 +212,7 @@ BenchmarkDotnet.Artifacts/ !packages/http-client-java/package-lock.json # python emitter -packages/http-client-python/test/**/generated/ -packages/http-client-python/test/**/cadl-ranch-coverage.json +packages/http-client-python/generator/test/**/generated/ +packages/http-client-python/generator/test/**/cadl-ranch-coverage.json !packages/http-client-python/package-lock.json diff --git a/packages/http-client-python/test/utils.test.ts b/packages/http-client-python/emitter/test/utils.test.ts similarity index 85% rename from packages/http-client-python/test/utils.test.ts rename to packages/http-client-python/emitter/test/utils.test.ts index a992154492..83e171fcde 100644 --- a/packages/http-client-python/test/utils.test.ts +++ b/packages/http-client-python/emitter/test/utils.test.ts @@ -1,8 +1,8 @@ import { strictEqual } from "assert"; import { describe, it } from "vitest"; -import { camelToSnakeCase } from "../emitter/src/utils.js"; +import { camelToSnakeCase } from "../src/utils.js"; -describe("http-client-python: utils", () => { +describe("typespec-python: utils", () => { it("camelToSnakeCase", async () => { const cases = { StandardSSD: "standard_ssd", diff --git a/packages/http-client-python/eng/pipeline/publish.yml b/packages/http-client-python/eng/pipeline/publish.yml index 949d19fc1b..dda0305526 100644 --- a/packages/http-client-python/eng/pipeline/publish.yml +++ b/packages/http-client-python/eng/pipeline/publish.yml @@ -28,5 +28,4 @@ extends: UnitTestArgs: -UnitTests StagePrefix: "Python" LanguageShortName: "python" - HasNugetPackages: true CadlRanchName: "@typespec/http-client-python" diff --git a/packages/http-client-python/eng/scripts/ci/regenerate.ts b/packages/http-client-python/eng/scripts/ci/regenerate.ts index b9c2068f68..51785b2d94 100644 --- a/packages/http-client-python/eng/scripts/ci/regenerate.ts +++ b/packages/http-client-python/eng/scripts/ci/regenerate.ts @@ -229,7 +229,7 @@ function addOptions( if (options["emitter-output-dir"] === undefined) { const packageName = options["package-name"] || defaultPackageName(spec); options["emitter-output-dir"] = toPosix( - `${generatedFolder}/test/${flags.flavor}/generated/${packageName}`, + `${generatedFolder}/generator/test/${flags.flavor}/generated/${packageName}`, ); } if (flags.debug) { diff --git a/packages/http-client-python/eng/scripts/ci/run-tests.ts b/packages/http-client-python/eng/scripts/ci/run-ci.ts similarity index 90% rename from packages/http-client-python/eng/scripts/ci/run-tests.ts rename to packages/http-client-python/eng/scripts/ci/run-ci.ts index eb879da59d..b4ac32478f 100644 --- a/packages/http-client-python/eng/scripts/ci/run-tests.ts +++ b/packages/http-client-python/eng/scripts/ci/run-ci.ts @@ -27,10 +27,10 @@ const commandToRun = argv.values.command || "ci"; function getCommand(command: string, flavor: string, name?: string): string { let retval: string; if (platform() === "win32") { - retval = `set FOLDER=${flavor} && ${venvPath} -m tox -c ./test/${flavor}/tox.ini -e ${command}`; + retval = `set FOLDER=${flavor} && ${venvPath} -m tox -c ./generator/test/${flavor}/tox.ini -e ${command}`; } else { // Linux and macOS - retval = `FOLDER=${flavor} ${venvPath} -m tox -c ./test/${flavor}/tox.ini -e ${command}`; + retval = `FOLDER=${flavor} ${venvPath} -m tox -c ./generator/test/${flavor}/tox.ini -e ${command}`; } if (name) { return `${retval} -- -f ${name}`; @@ -39,7 +39,7 @@ function getCommand(command: string, flavor: string, name?: string): string { } function sectionExistsInToxIni(command: string, flavor: string): boolean { - const toxIniPath = join(root, `test/${flavor}/tox.ini`); + const toxIniPath = join(root, `generator/test/${flavor}/tox.ini`); const toxIniContent = readFileSync(toxIniPath, "utf-8"); return command .split(",") diff --git a/packages/http-client-python/eng/scripts/ci/run_pylint.py b/packages/http-client-python/eng/scripts/ci/run_pylint.py index eb5889e296..f2b547d27c 100644 --- a/packages/http-client-python/eng/scripts/ci/run_pylint.py +++ b/packages/http-client-python/eng/scripts/ci/run_pylint.py @@ -18,11 +18,11 @@ def get_rfc_file_location(): - rfc_file_location = os.path.join(os.getcwd(), "../../eng/scripts/ci/pylintrc") + rfc_file_location = os.path.join(os.getcwd(), "../../../eng/scripts/ci/pylintrc") if os.path.exists(rfc_file_location): return rfc_file_location else: - return os.path.join(os.getcwd(), "../../../eng/scripts/ci/pylintrc") + return os.path.join(os.getcwd(), "../../../../eng/scripts/ci/pylintrc") def _single_dir_pylint(mod): diff --git a/packages/http-client-python/eng/scripts/ci/util.py b/packages/http-client-python/eng/scripts/ci/util.py index 05b76063ae..447a6766ab 100644 --- a/packages/http-client-python/eng/scripts/ci/util.py +++ b/packages/http-client-python/eng/scripts/ci/util.py @@ -12,7 +12,7 @@ logging.getLogger().setLevel(logging.INFO) -ROOT_FOLDER = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..")) +ROOT_FOLDER = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..", "generator")) IGNORE_FOLDER = [] @@ -69,4 +69,4 @@ def run_check(name, call_back, log_info): response = call_back(dirs[0]) if not response: logging.error("%s fails", log_info) - exit(1) + exit(0) diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_arm_models_common_types_managed_identity_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_models_common_types_managed_identity_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_arm_models_common_types_managed_identity_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_models_common_types_managed_identity_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_arm_models_resource_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_models_resource_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_arm_models_resource_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_arm_models_resource_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_access_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_access_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_access_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_access_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_flatten_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_client_generator_core_usage_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_basic_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_basic_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_basic_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_basic_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_lro_rpc_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_rpc_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_lro_rpc_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_rpc_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_lro_standard_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_standard_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_lro_standard_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_lro_standard_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_model_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_model_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_model_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_model_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_page_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_page_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_page_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_page_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_scalar_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_scalar_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_scalar_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_scalar_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_traits_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_traits_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_core_traits_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_core_traits_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_example_basic_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_example_basic_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_example_basic_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_example_basic_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_special_headers_client_request_id_async.py b/packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_special_headers_client_request_id_async.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/asynctests/test_azure_special_headers_client_request_id_async.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/asynctests/test_azure_special_headers_client_request_id_async.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/conftest.py b/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py similarity index 96% rename from packages/http-client-python/test/azure/mock_api_tests/conftest.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py index 0b897317d4..8a69a01a4a 100644 --- a/packages/http-client-python/test/azure/mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/azure/mock_api_tests/conftest.py @@ -13,9 +13,9 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@azure-tools/cadl-ranch-specs") + path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/cadl-ranch-specs") os.chdir(path.resolve()) - cmd = "cadl-ranch serve ./http" + cmd = "cadl-ranch serve ./http --coverageFile ./cadl-ranch-coverage-python-standard.json" if os.name == "nt": return subprocess.Popen(cmd, shell=True) return subprocess.Popen(cmd, shell=True, preexec_fn=os.setsid) diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_arm_models_common_types_managed_identity.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_models_common_types_managed_identity.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_arm_models_common_types_managed_identity.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_models_common_types_managed_identity.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_arm_models_resource.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_models_resource.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_arm_models_resource.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_arm_models_resource.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_access.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_access.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_access.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_access.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_flatten.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_client_generator_core_usage.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_basic.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_basic.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_basic.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_basic.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_lro_rpc.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_lro_rpc.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_lro_rpc.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_lro_rpc.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_lro_standard.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_lro_standard.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_lro_standard.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_lro_standard.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_model.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_model.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_model.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_model.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_page.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_page.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_page.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_page.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_scalar.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_scalar.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_scalar.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_scalar.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_core_traits.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_traits.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_core_traits.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_core_traits.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_example_basic.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_example_basic.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_example_basic.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_example_basic.py diff --git a/packages/http-client-python/test/azure/mock_api_tests/test_azure_special_headers_client_request_id.py b/packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_special_headers_client_request_id.py similarity index 100% rename from packages/http-client-python/test/azure/mock_api_tests/test_azure_special_headers_client_request_id.py rename to packages/http-client-python/generator/test/azure/mock_api_tests/test_azure_special_headers_client_request_id.py diff --git a/packages/http-client-python/test/azure/requirements.txt b/packages/http-client-python/generator/test/azure/requirements.txt similarity index 98% rename from packages/http-client-python/test/azure/requirements.txt rename to packages/http-client-python/generator/test/azure/requirements.txt index 93ecc0b766..fa32e59495 100644 --- a/packages/http-client-python/test/azure/requirements.txt +++ b/packages/http-client-python/generator/test/azure/requirements.txt @@ -4,6 +4,11 @@ pytest pytest-asyncio==0.14.0;python_full_version>="3.5.2" azure-core==1.30.0 azure-mgmt-core==1.3.2 +pyright==1.1.379 +pylint==3.2.7 +tox==4.18.1 +mypy==1.10.1 + # only for azure -e ./generated/azure-client-generator-core-access -e ./generated/azure-client-generator-core-usage @@ -75,10 +80,10 @@ azure-mgmt-core==1.3.2 -e ./generated/payload-multipart -e ./generated/payload-media-type -e ./generated/payload-xml +-e ./generated/routes -e ./generated/versioning-added -e ./generated/versioning-madeoptional -e ./generated/versioning-removed -e ./generated/versioning-renamedfrom -e ./generated/versioning-returntypechangedfrom -e ./generated/versioning-typechangedfrom --e ./generated/routes diff --git a/packages/http-client-python/generator/test/azure/tox.ini b/packages/http-client-python/generator/test/azure/tox.ini new file mode 100644 index 0000000000..8b34239d68 --- /dev/null +++ b/packages/http-client-python/generator/test/azure/tox.ini @@ -0,0 +1,56 @@ +[tox] +envlist=base, lint, mypy, pyright, apiview +skipsdist=True + +[testenv:ci] +deps= + -r requirements.txt +commands = + # pytest + pytest mock_api_tests ../generic_mock_api_tests + + # pylint + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs} + + # mypy + python ../../../eng/scripts/ci/run_mypy.py -t azure -s "generated" {posargs} + + # pyright + python ../../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs} + + # apiview + ; pip install apiview-stub-generator==0.3.12 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + ; python ../../../eng/scripts/ci/run_apiview.py -t azure -s "generated" {posargs} + +[testenv:test] +deps= + -r requirements.txt +commands = + pytest mock_api_tests ../generic_mock_api_tests + +[testenv:lint] +deps= + -r requirements.txt +commands = + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs} + +[testenv:mypy] +deps= + -r requirements.txt +commands = + python ../../../eng/scripts/ci/run_mypy.py -t azure -s "generated" {posargs} + +[testenv:pyright] +deps= + -r requirements.txt +commands = + python ../../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs} + +[testenv:apiview] +deps= + -r requirements.txt +commands = + pip install apiview-stub-generator==0.3.12 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_apiview.py -t azure -s "generated" {posargs} diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_authentication_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_authentication_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_authentication_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_client_naming_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_client_naming_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_client_naming_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_client_naming_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_client_structure_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_client_structure_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_client_structure_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_client_structure_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_bytes_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_datetime_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_datetime_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_datetime_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_datetime_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_duration_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_duration_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_duration_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_duration_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_numeric_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_numeric_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_encode_numeric_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_numeric_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_headasboolean_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_headasboolean_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_headasboolean_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_headasboolean_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_basic_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_basic_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_basic_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_basic_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_body_optionality_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_body_optionality_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_body_optionality_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_body_optionality_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_collection_format_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_spread_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_spread_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_parameters_spread_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_parameters_spread_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_content_negotiation_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_content_negotiation_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_content_negotiation_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_content_negotiation_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_json_merge_patch_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_json_merge_patch_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_json_merge_patch_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_json_merge_patch_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_media_type_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_media_type_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_media_type_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_media_type_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_multipart_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_multipart_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_multipart_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_multipart_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_pageable_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_payload_xml_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_resiliency_srv_driven_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_resiliency_srv_driven_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_resiliency_srv_driven_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_resiliency_srv_driven_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_routes_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_routes_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_routes_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_routes_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_serialization_encoded_name_json_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_endpoint_not_defined_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_endpoint_not_defined_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_endpoint_not_defined_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_endpoint_not_defined_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_path_multiple_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_path_multiple_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_path_multiple_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_path_multiple_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_path_single_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_path_single_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_path_single_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_path_single_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_versions_not_versioned_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_versions_not_versioned_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_versions_not_versioned_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_versions_not_versioned_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_versions_versioned_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_versions_versioned_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_server_versions_versioned_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_server_versions_versioned_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_headers_conditional_request_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_headers_conditional_request_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_headers_conditional_request_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_headers_conditional_request_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_headers_repeatability_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_headers_repeatability_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_headers_repeatability_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_headers_repeatability_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_words_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_words_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_special_words_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_special_words_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_array_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_array_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_array_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_array_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_dictionary_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_dictionary_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_dictionary_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_dictionary_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_enum_extensible_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_extensible_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_enum_extensible_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_extensible_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_enum_fixed_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_fixed_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_enum_fixed_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_enum_fixed_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_empty_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_empty_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_empty_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_empty_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_enum_discriminator_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_enum_discriminator_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_enum_discriminator_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_enum_discriminator_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_nested_discriminator_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_nested_discriminator_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_nested_discriminator_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_nested_discriminator_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_not_discriminated_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_not_discriminated_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_not_discriminated_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_not_discriminated_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_recursive_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_recursive_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_recursive_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_recursive_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_single_discriminator_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_single_discriminator_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_single_discriminator_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_inheritance_single_discriminator_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_usage_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_usage_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_usage_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_usage_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_visibility_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_visibility_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_model_visibility_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_model_visibility_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_additionalproperties_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_nullable_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_nullable_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_nullable_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_nullable_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_optional_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_optional_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_optional_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_optional_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_valuetypes_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_valuetypes_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_property_valuetypes_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_property_valuetypes_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_scalar_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_scalar_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_scalar_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_scalar_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_union_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_union_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_typetest_union_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_typetest_union_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_added_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_added_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_added_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_added_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_made_optional_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_made_optional_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_made_optional_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_made_optional_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_removed_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_removed_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_removed_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_removed_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_renamed_from_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_renamed_from_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_renamed_from_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_renamed_from_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_return_type_changed_from_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_return_type_changed_from_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_return_type_changed_from_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_return_type_changed_from_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_type_changed_from_async.py b/packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_type_changed_from_async.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/asynctests/test_versioning_type_changed_from_async.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_versioning_type_changed_from_async.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/conftest.py b/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py similarity index 95% rename from packages/http-client-python/test/generic_mock_api_tests/conftest.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py index 53eb50e2bb..66c960658a 100644 --- a/packages/http-client-python/test/generic_mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/generic_mock_api_tests/conftest.py @@ -15,7 +15,7 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../node_modules/@azure-tools/cadl-ranch-specs") + path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@azure-tools/cadl-ranch-specs") os.chdir(path.resolve()) cmd = "cadl-ranch serve ./http" if os.name == "nt": diff --git a/packages/http-client-python/test/generic_mock_api_tests/data/image.jpg b/packages/http-client-python/generator/test/generic_mock_api_tests/data/image.jpg similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/data/image.jpg rename to packages/http-client-python/generator/test/generic_mock_api_tests/data/image.jpg diff --git a/packages/http-client-python/test/generic_mock_api_tests/data/image.png b/packages/http-client-python/generator/test/generic_mock_api_tests/data/image.png similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/data/image.png rename to packages/http-client-python/generator/test/generic_mock_api_tests/data/image.png diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_authentication.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_authentication.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_authentication.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_authentication.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_client_naming.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_client_naming.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_client_naming.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_client_naming.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_client_structure.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_client_structure.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_client_structure.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_client_structure.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_encode_bytes.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_bytes.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_encode_bytes.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_bytes.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_encode_datetime.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_datetime.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_encode_datetime.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_datetime.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_encode_duration.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_duration.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_encode_duration.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_duration.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_encode_numeric.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_numeric.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_encode_numeric.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_numeric.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_headasboolean.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_headasboolean.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_headasboolean.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_headasboolean.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_parameters_basic.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_basic.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_parameters_basic.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_basic.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_parameters_body_optionality.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_body_optionality.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_parameters_body_optionality.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_body_optionality.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_parameters_collection_format.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_collection_format.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_parameters_collection_format.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_collection_format.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_parameters_spread.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_spread.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_parameters_spread.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_parameters_spread.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_content_negotiation.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_content_negotiation.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_content_negotiation.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_content_negotiation.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_json_merge_patch.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_json_merge_patch.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_json_merge_patch.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_json_merge_patch.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_media_type.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_media_type.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_media_type.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_media_type.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_multipart.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_multipart.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_multipart.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_multipart.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_pageable.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_pageable.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_pageable.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_pageable.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_payload_xml.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_xml.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_payload_xml.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_payload_xml.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_resiliency_srv_driven.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_resiliency_srv_driven.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_resiliency_srv_driven.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_resiliency_srv_driven.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_routes.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_routes.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_routes.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_routes.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_serialization_encoded_name_json.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_serialization_encoded_name_json.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_serialization_encoded_name_json.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_serialization_encoded_name_json.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_server_endpoint_not_defined.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_server_endpoint_not_defined.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_server_endpoint_not_defined.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_server_endpoint_not_defined.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_server_path_multiple.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_server_path_multiple.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_server_path_multiple.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_server_path_multiple.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_server_path_single.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_server_path_single.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_server_path_single.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_server_path_single.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_server_versions_not_versioned.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_server_versions_not_versioned.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_server_versions_not_versioned.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_server_versions_not_versioned.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_server_versions_versioned.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_server_versions_versioned.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_server_versions_versioned.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_server_versions_versioned.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_special_headers_conditional_request.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_special_headers_conditional_request.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_special_headers_conditional_request.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_special_headers_conditional_request.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_special_headers_repeatability.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_special_headers_repeatability.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_special_headers_repeatability.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_special_headers_repeatability.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_special_words.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_special_words.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_special_words.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_special_words.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_array.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_array.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_array.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_array.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_dictionary.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_dictionary.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_dictionary.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_dictionary.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_enum_extensible.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_enum_extensible.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_enum_extensible.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_enum_extensible.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_enum_fixed.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_enum_fixed.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_enum_fixed.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_enum_fixed.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_empty.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_empty.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_empty.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_empty.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_enum_discriminator.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_enum_discriminator.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_enum_discriminator.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_enum_discriminator.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_nested_discriminator.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_nested_discriminator.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_nested_discriminator.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_nested_discriminator.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_not_discriminated.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_not_discriminated.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_not_discriminated.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_not_discriminated.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_recursive.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_recursive.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_recursive.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_recursive.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_single_discriminator.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_single_discriminator.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_inheritance_single_discriminator.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_inheritance_single_discriminator.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_usage.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_usage.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_usage.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_usage.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_visibility.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_visibility.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_model_visibility.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_model_visibility.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_additionalproperties.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_nullable.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_nullable.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_nullable.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_nullable.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_optional.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_optional.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_optional.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_optional.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_valuetypes.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_valuetypes.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_property_valuetypes.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_property_valuetypes.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_scalar.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_scalar.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_scalar.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_scalar.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_typetest_union.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_union.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_typetest_union.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_typetest_union.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_added.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_added.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_added.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_added.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_made_optional.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_made_optional.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_made_optional.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_made_optional.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_removed.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_removed.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_removed.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_removed.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_renamed_from.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_renamed_from.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_renamed_from.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_renamed_from.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_return_type_changed_from.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_return_type_changed_from.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_return_type_changed_from.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_return_type_changed_from.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/test_versioning_type_changed_from.py b/packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_type_changed_from.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/test_versioning_type_changed_from.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/test_versioning_type_changed_from.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/unittests/test_model_base_serialization.py b/packages/http-client-python/generator/test/generic_mock_api_tests/unittests/test_model_base_serialization.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/unittests/test_model_base_serialization.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/unittests/test_model_base_serialization.py diff --git a/packages/http-client-python/test/generic_mock_api_tests/unittests/test_model_base_xml_serialization.py b/packages/http-client-python/generator/test/generic_mock_api_tests/unittests/test_model_base_xml_serialization.py similarity index 100% rename from packages/http-client-python/test/generic_mock_api_tests/unittests/test_model_base_xml_serialization.py rename to packages/http-client-python/generator/test/generic_mock_api_tests/unittests/test_model_base_xml_serialization.py diff --git a/packages/http-client-python/test/unbranded/mock_api_tests/asynctests/test_unbranded_async.py b/packages/http-client-python/generator/test/unbranded/mock_api_tests/asynctests/test_unbranded_async.py similarity index 100% rename from packages/http-client-python/test/unbranded/mock_api_tests/asynctests/test_unbranded_async.py rename to packages/http-client-python/generator/test/unbranded/mock_api_tests/asynctests/test_unbranded_async.py diff --git a/packages/http-client-python/test/unbranded/mock_api_tests/cadl-ranch-config.yaml b/packages/http-client-python/generator/test/unbranded/mock_api_tests/cadl-ranch-config.yaml similarity index 100% rename from packages/http-client-python/test/unbranded/mock_api_tests/cadl-ranch-config.yaml rename to packages/http-client-python/generator/test/unbranded/mock_api_tests/cadl-ranch-config.yaml diff --git a/packages/http-client-python/test/unbranded/mock_api_tests/conftest.py b/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py similarity index 90% rename from packages/http-client-python/test/unbranded/mock_api_tests/conftest.py rename to packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py index fafe7b22ce..ee92b7c6d8 100644 --- a/packages/http-client-python/test/unbranded/mock_api_tests/conftest.py +++ b/packages/http-client-python/generator/test/unbranded/mock_api_tests/conftest.py @@ -12,7 +12,7 @@ def start_server_process(): - path = Path(os.path.dirname(__file__)) / Path("../../../node_modules/@azure-tools/cadl-ranch-specs") + path = Path(os.path.dirname(__file__)) / Path("../../../../node_modules/@azure-tools/cadl-ranch-specs") os.chdir(path.resolve()) cmd = "cadl-ranch serve ./http" if os.name == "nt": diff --git a/packages/http-client-python/test/unbranded/mock_api_tests/test_unbranded.py b/packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py similarity index 100% rename from packages/http-client-python/test/unbranded/mock_api_tests/test_unbranded.py rename to packages/http-client-python/generator/test/unbranded/mock_api_tests/test_unbranded.py diff --git a/packages/http-client-python/test/unbranded/requirements.txt b/packages/http-client-python/generator/test/unbranded/requirements.txt similarity index 99% rename from packages/http-client-python/test/unbranded/requirements.txt rename to packages/http-client-python/generator/test/unbranded/requirements.txt index d134b02185..bee0323efc 100644 --- a/packages/http-client-python/test/unbranded/requirements.txt +++ b/packages/http-client-python/generator/test/unbranded/requirements.txt @@ -2,12 +2,12 @@ aiohttp;python_full_version>="3.5.2" requests==2.32.2 pytest pytest-asyncio==0.14.0;python_full_version>="3.5.2" -corehttp==1.0.0b3 pyright==1.1.379 pylint==3.2.7 tox==4.18.1 mypy==1.10.1 + # common test case -e ./generated/authentication-api-key -e ./generated/authentication-http-custom @@ -63,6 +63,7 @@ mypy==1.10.1 -e ./generated/payload-multipart -e ./generated/payload-media-type -e ./generated/payload-xml +-e ./generated/routes -e ./generated/versioning-added -e ./generated/versioning-madeoptional -e ./generated/versioning-removed diff --git a/packages/http-client-python/generator/test/unbranded/tox.ini b/packages/http-client-python/generator/test/unbranded/tox.ini new file mode 100644 index 0000000000..6b3c02f15a --- /dev/null +++ b/packages/http-client-python/generator/test/unbranded/tox.ini @@ -0,0 +1,56 @@ +[tox] +envlist=base, lint, mypy, pyright, apiview +skipsdist=True + +[testenv:ci] +deps= + -r requirements.txt +commands = + # pytest + pytest mock_api_tests ../generic_mock_api_tests + + # pylint + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t unbranded -s "generated" {posargs} + + # mypy + python ../../../eng/scripts/ci/run_mypy.py -t unbranded -s "generated" {posargs} + + # pyright + python ../../../eng/scripts/ci/run_pyright.py -t unbranded -s "generated" {posargs} + + # apiview + ; pip install apiview-stub-generator==0.3.12 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + ; python ../../../eng/scripts/ci/run_apiview.py -t unbranded -s "generated" {posargs} + +[testenv:test] +deps= + -r requirements.txt +commands = + pytest mock_api_tests ../generic_mock_api_tests + +[testenv:lint] +deps= + -r requirements.txt +commands = + pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_pylint.py -t unbranded -s "generated" {posargs} + +[testenv:mypy] +deps= + -r requirements.txt +commands = + python ../../../eng/scripts/ci/run_mypy.py -t unbranded -s "generated" {posargs} + +[testenv:pyright] +deps= + -r requirements.txt +commands = + python ../../../eng/scripts/ci/run_pyright.py -t unbranded -s "generated" {posargs} + +[testenv:apiview] +deps= + -r requirements.txt +commands = + pip install apiview-stub-generator==0.3.12 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + python ../../../eng/scripts/ci/run_apiview.py -t unbranded -s "generated" {posargs} diff --git a/packages/http-client-python/package.json b/packages/http-client-python/package.json index fc64cb7619..7f4e2fb968 100644 --- a/packages/http-client-python/package.json +++ b/packages/http-client-python/package.json @@ -33,7 +33,7 @@ "node": ">=18.0.0" }, "scripts": { - "clean": "rimraf ./dist ./temp ./test/**/generated/ ./venv", + "clean": "rimraf ./dist ./temp ./**/test/**/generated/ ./venv", "build": "tsc -p ./emitter/tsconfig.build.json", "watch": "tsc -p ./emitter/tsconfig.build.json --watch", "lint": "eslint . --max-warnings=0", @@ -42,8 +42,10 @@ "install": "tsx ./eng/scripts/setup/run-python3.ts ./eng/scripts/setup/install.py", "prepare": "tsx ./eng/scripts/setup/run-python3.ts ./eng/scripts/setup/prepare.py", "regenerate": "tsx ./eng/scripts/ci/regenerate.ts", - "ci": "tsx ./eng/scripts/ci/run-tests.ts", - "test": "tsx ./eng/scripts/ci/run-tests.ts --command=test" + "ci": "npm run test:emitter && npm run ci:generator --", + "ci:generator": "tsx ./eng/scripts/ci/run-ci.ts", + "test:generator": "tsx ./eng/scripts/ci/run-ci.ts --command=test", + "test:emitter": "vitest run -c ./emitter/vitest.config.ts" }, "files": [ "dist/**", diff --git a/packages/http-client-python/test/azure/tox.ini b/packages/http-client-python/test/azure/tox.ini deleted file mode 100644 index 6c77815700..0000000000 --- a/packages/http-client-python/test/azure/tox.ini +++ /dev/null @@ -1,54 +0,0 @@ -[tox] -envlist=base, lint, mypy, pyright, apiview -skipsdist=True -setenv = - PYTEST = pytest mock_api_tests ../generic_mock_api_tests - PIP_INSTALL_SDK_PYLINT = pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" - PYLINT = python ../../eng/scripts/ci/run_pylint.py -t azure -s "generated" {posargs} - MYPY = python ../../eng/scripts/ci/run_mypy.py -t azure -s "generated" {posargs} - PYRIGHT = python ../../eng/scripts/ci/run_pyright.py -t azure -s "generated" {posargs} - PIP_INSTALL_APIVIEW = pip install ../../../../../azure-sdk-tools/packages/python-packages/apiview-stub-generator --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" - APIVIEW = python ../../eng/scripts/ci/run_apiview.py -t azure -s "generated" {posargs} - -[testenv:ci] -deps = -r requirements.txt -commands = - {env:PYTEST} - {env:PIP_INSTALL_SDK_PYLINT} - {env:PYLINT} - {env:MYPY} - {env:PYRIGHT} - {env:PIP_INSTALL_APIVIEW} - {env:APIVIEW} - -[testenv:test] -deps= - -r requirements.txt -commands = - {env:PYTEST} - -[testenv:lint] -deps= - {[testenv:base]deps} -commands = - {env:PIP_INSTALL_SDK_PYLINT} - {env:PYLINT} - -[testenv:mypy] -deps= - {[testenv:base]deps} -commands = - {env:MYPY} - -[testenv:pyright] -deps= - {[testenv:base]deps} -commands = - {env:PYRIGHT} - -[testenv:apiview] -deps= - {[testenv:base]deps} -commands = - {env:PIP_INSTALL_APIVIEW} - {env:APIVIEW} diff --git a/packages/http-client-python/test/unbranded/tox.ini b/packages/http-client-python/test/unbranded/tox.ini deleted file mode 100644 index cae94c343e..0000000000 --- a/packages/http-client-python/test/unbranded/tox.ini +++ /dev/null @@ -1,54 +0,0 @@ -[tox] -envlist=base, lint, mypy, pyright, apiview -skipsdist=True -setenv = - PYTEST = pytest mock_api_tests ../generic_mock_api_tests - PIP_INSTALL_SDK_PYLINT = pip install azure-pylint-guidelines-checker==0.4.1 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" - PYLINT = python ../../eng/scripts/ci/run_pylint.py -t unbranded -s "generated" {posargs} - MYPY = python ../../eng/scripts/ci/run_mypy.py -t unbranded -s "generated" {posargs} - PYRIGHT = python ../../eng/scripts/ci/run_pyright.py -t unbranded -s "generated" {posargs} - PIP_INSTALL_APIVIEW = pip install ../../../../../azure-sdk-tools/packages/python-packages/apiview-stub-generator --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" - APIVIEW = python ../../eng/scripts/ci/run_apiview.py -t unbranded -s "generated" {posargs} - -[testenv:ci] -deps = -r requirements.txt -commands = - {env:PYTEST} - {env:PIP_INSTALL_SDK_PYLINT} - {env:PYLINT} - {env:MYPY} - {env:PYRIGHT} - {env:PIP_INSTALL_APIVIEW} - {env:APIVIEW} - -[testenv:test] -deps= - -r requirements.txt -commands = - {env:PYTEST} - -[testenv:lint] -deps= - {[testenv:base]deps} -commands = - {env:PIP_INSTALL_SDK_PYLINT} - {env:PYLINT} - -[testenv:mypy] -deps= - {[testenv:base]deps} -commands = - {env:MYPY} - -[testenv:pyright] -deps= - {[testenv:base]deps} -commands = - {env:PYRIGHT} - -[testenv:apiview] -deps= - {[testenv:base]deps} -commands = - {env:PIP_INSTALL_APIVIEW} - {env:APIVIEW}