30 lines
673 B
Python
30 lines
673 B
Python
#\!/usr/bin/env python3
|
|
"""Simple test file for CI pipeline validation."""
|
|
|
|
import sys
|
|
|
|
def test_python_version():
|
|
"""Test that Python version is 3.x"""
|
|
assert sys.version_info.major == 3
|
|
print(f"Python version check passed: {sys.version}")
|
|
|
|
def test_basic_math():
|
|
"""Test basic arithmetic"""
|
|
assert 2 + 2 == 4
|
|
print("Basic math test passed")
|
|
|
|
def test_string_operations():
|
|
"""Test string operations"""
|
|
s = "Hello CI"
|
|
assert "CI" in s
|
|
assert len(s) == 8
|
|
print("String test passed")
|
|
|
|
if __name__ == "__main__":
|
|
test_python_version()
|
|
test_basic_math()
|
|
test_string_operations()
|
|
print("
|
|
=== All tests passed\! ===")
|
|
|