-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from chaen/setuptools
Workaround for setuptools issue in autorest
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -10,6 +10,9 @@ | |
# pytestmark = pytest.mark.enabled_dependencies(["ConfigSource", "AuthSettings"]) | ||
|
||
|
||
AUTOREST_VERSION = "6.13.7" | ||
|
||
|
||
@pytest.fixture | ||
def test_client(client_factory): | ||
with client_factory.unauthenticated() as client: | ||
|
@@ -53,8 +56,12 @@ def test_regenerate_client(test_client, tmp_path): | |
"--namespace=client", | ||
f"--output-folder={output_folder}", | ||
] | ||
|
||
# This is required to be able to work offline | ||
cmd += ["--use=@autorest/[email protected]"] | ||
# TODO: if offline, find the version already installed | ||
# and use it | ||
# cmd += [f"--use=@autorest/python@{AUTOREST_VERSION}"] | ||
|
||
subprocess.run(cmd, check=True) | ||
|
||
cmd = ["pre-commit", "run", "--all-files"] | ||
|
@@ -64,3 +71,7 @@ def test_regenerate_client(test_client, tmp_path): | |
subprocess.run(cmd, check=True, cwd=repo_root) | ||
if repo.is_dirty(path=repo_root / "src" / "diracx" / "client"): | ||
raise AssertionError("Client was regenerated with changes") | ||
|
||
|
||
if __name__ == "__main__": | ||
print(AUTOREST_VERSION) |