You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
example_readme_generator.py crashes at pytest collection time #592
example_readme_generator.py crashes at pytest collection time
Description
docs/examples/aLora/example_readme_generator.py calls generate_readme() at module level (line 6), which internally calls start_session() → OllamaModelBackend(). This runs during pytest collection before the # pytest: skip marker is processed, causing:
Exception: could not create OllamaModelBackend: ollama server not running at None
Fix options
Change marker to # pytest: skip_always so it's excluded before import
Wrap the call in if __name__ == "__main__": so it only runs when executed directly
Option 2 is preferred — it follows Python best practices and still allows the example to be run standalone.
Activity
fix: explicit PYTHONPATH for isolated test subprocesses (generative-c…
fix: prevent execution of readme_generator during pytest collection (g…
fix: prevent example collection crash for readme_generator (#596)
fix: prevent example collection crash for readme_generator (generativ…