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.
example_readme_generator.pycrashes at pytest collection timeDescription
docs/examples/aLora/example_readme_generator.pycallsgenerate_readme()at module level (line 6), which internally callsstart_session()→OllamaModelBackend(). This runs during pytest collection before the# pytest: skipmarker is processed, causing:Fix options
# pytest: skip_alwaysso it's excluded before importif __name__ == "__main__":so it only runs when executed directlyOption 2 is preferred — it follows Python best practices and still allows the example to be run standalone.