Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /GRID-INTELLIGENCE_GRID /tests /unit /test_cli.py
| """CLI tests for GRID. | |
| Note: These tests require the 'click' package. | |
| Tests are skipped if click is not available. | |
| """ | |
| import os | |
| import sys | |
| import pytest | |
| # Skip entire module if click is not available | |
| try: | |
| from click.testing import CliRunner # type: ignore[import-not-found] | |
| except ImportError: | |
| pytest.skip( | |
| "click package not installed - skipping CLI tests. Install with: pip install click", | |
| allow_module_level=True, | |
| ) | |
| sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))) | |
| from grid.cli.main import cli | |
| class TestEventCommands: | |
| def test_list_events(self): | |
| runner = CliRunner() | |
| result = runner.invoke(cli, ["list-events"]) | |
| if result.exit_code != 0: | |
| pytest.fail(f"CLI failed. Output: {result.output}\nExc: {result.exception}") | |
| assert result.exit_code == 0 | |
| assert "- event1" in result.output | |
| assert "- event2" in result.output | |
Xet Storage Details
- Size:
- 959 Bytes
- Xet hash:
- 0edd5eaed9bf2f3a0677cef004db233860b2ba34d6894fb244b6e268589889ea
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.