Instructions to use EzioDevio/gemma4-dev-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EzioDevio/gemma4-dev-agent with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("EzioDevio/gemma4-dev-agent", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tests/test_coverage_gap.py from EzioDevio/gemma4-dev-agent: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/EzioDevio/gemma4-dev-agent/resolve/main/tests/test_coverage_gap.py
- Command line
-
hf download hf://EzioDevio/gemma4-dev-agent/tests/test_coverage_gap.py
-
curl -L -o test_coverage_gap.py https://huggingface.co/EzioDevio/gemma4-dev-agent/resolve/main/tests/test_coverage_gap.py
1.41 kB
| from unittest.mock import patch, mock_open | |
| import pytest | |
| from scripts.agent import ( | |
| run_bash_command, | |
| run_file_read, | |
| run_repo_ast_parser, | |
| process_query, | |
| ) | |
| def test_run_bash_command_exception(): | |
| with patch("subprocess.run", side_effect=Exception("Subprocess failure")): | |
| result = run_bash_command("echo test") | |
| assert "Error executing bash command: Subprocess failure" in result | |
| def test_run_file_read_exception(): | |
| with patch("os.path.exists", return_value=True), \ | |
| patch("builtins.open", side_effect=Exception("File access denied")): | |
| result = run_file_read("some_file.py") | |
| assert "Error reading file: File access denied" in result | |
| def test_run_repo_ast_parser_imports_and_classes(): | |
| code_content = """ | |
| from module_a import something | |
| class SampleClass: | |
| pass | |
| """ | |
| with patch("os.path.exists", return_value=True), \ | |
| patch("builtins.open", mock_open(read_data=code_content)): | |
| result = run_repo_ast_parser("dummy.py") | |
| assert "module_a" in result | |
| assert "SampleClass" in result | |
| def test_process_query_scripts_branch(): | |
| with patch("scripts.agent.run_pytest_suite", return_value="OK") as mock_suite: | |
| res = process_query("run pytest coverage scripts") | |
| mock_suite.assert_called_once() | |
| _, kwargs = mock_suite.call_args | |
| assert kwargs.get("cov_module") == "scripts" | |