הראה קוד מקור ל test_basic

"""Basic tests for Code Keeper Bot - Simple Version"""
import pytest
import sys
import os

[תיעוד] def test_python_version(): """Test Python version is 3.8+""" assert sys.version_info >= (3, 8), "Python 3.8+ required"
[תיעוד] def test_import_main(): """Test that main.py can be imported""" try: import main assert True except ImportError as e: pytest.skip(f"Main module import failed: {e}")
[תיעוד] def test_environment(): """Test basic environment setup""" assert os.path.exists("requirements.txt"), "requirements.txt not found"
[תיעוד] def test_basic_calculation(): """Simple sanity check""" assert 2 + 2 == 4 assert "bot" in "Code Keeper Bot".lower()
[תיעוד] class TestRequirements: """Test required packages"""
[תיעוד] def test_telegram_installed(self): """Check telegram package""" try: import telegram assert True except ImportError: pytest.skip("telegram package not installed")
[תיעוד] def test_github_installed(self): """Check github package""" try: import github assert True except ImportError: pytest.skip("github package not installed")
if __name__ == "__main__": pytest.main([__file__, "-v"])