-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance integration tests: add cleanup mode for repository management…
… and implement test for basic repository operations
- Loading branch information
Dave Arnold
committed
Apr 29, 2025
1 parent
3c3d1a3
commit 4d564ab
Showing
4 changed files
with
73 additions
and
4 deletions.
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
16 changes: 16 additions & 0 deletions
16
template_automation/tests/integration/test_github_operations.py
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 |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import pytest | ||
| import os | ||
|
|
||
| @pytest.mark.integration | ||
| def test_repository_operations(test_repo, cleanup_mode): | ||
| """Test basic repository operations.""" | ||
| # Your test code here that uses the test_repo | ||
|
|
||
| # This is just an example verification | ||
| assert test_repo.name.startswith("test-repo-") | ||
|
|
||
| # Log what will happen to this repository | ||
| if cleanup_mode: | ||
| print(f"Repository {test_repo.name} will be DELETED after this test") | ||
| else: | ||
| print(f"Repository {test_repo.name} will be ARCHIVED after this test") |
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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [pytest] | ||
| markers = | ||
| integration: marks tests as integration tests (requires GitHub API access) | ||
| addopts = --timestamp=%(timestamp)s | ||
| python_functions = test_* |