Intelligent Python code testing library with real-time error detection
Project description
SmartTest - Intelligent Code Testing Library
๐ Overview
SmartTest is an intelligent Python code testing library that automatically detects errors, warnings, and potential issues in your code. It provides real-time monitoring with instant error detection and automatic error hiding when issues are resolved.
โจ Features
- ๐ Real-time Error Detection - Instantly detects errors as you code
- โก Ultra Fast Performance - Checks files every 0.1 seconds
- ๐ฏ Smart Analysis - Finds syntax errors, typos, and potential issues
- ๐ Auto-hide Errors - Errors disappear automatically when fixed
- ๐ Multi-file Support - Monitors all Python files in your project
- ๐จ Beautiful Terminal Interface - Colorful, easy-to-read output
- ๐ Zero Configuration - Works out of the box
๐ฆ Installation
pip install smarttest
๐ฏ Quick Start
Auto-Launch Application
import smarttest
# ๐ SmartTest application launches automatically!
# No need to do anything else - it starts monitoring immediately
Command Line
# Start monitoring
smarttest
# Launch desktop app
smarttest-app
Manual Usage
from smarttest import SmartTest
# Create instance manually
smarttest = SmartTest()
smarttest.start()
๐ง How It Works
- Auto Launch - SmartTest starts automatically when imported
- File Scanning - Scans all
.pyfiles in your project - Real-time Monitoring - Watches for file changes every 0.1 seconds
- Error Detection - Instantly detects and displays errors
- Auto-hide - Errors disappear when fixed
๐ Error Types Detected
Syntax Errors
- Invalid characters and corrupted text
- Mismatched parentheses
- Missing closing brackets
- Indentation errors
Code Quality Issues
- Typos in variable names
- Unused semicolons
- Long lines (over 79 characters)
- Security risks (eval, exec)
Performance Warnings
- Too many print statements
- Inefficient loops
- Import * usage
๐จ Terminal Output
๐ง SmartTest - Simple Error Detection
=====================================
๐ Watching for errors...
๐ Edit any .py file to see errors
โน๏ธ Press Ctrl+C to stop
๐ Scanning all Python files...
โ test_file.py: 4 errors
โข Line 25: Invalid characters
โข Line 30: Typo - "resut" should be "result"
... 2 more
โ
Fixed: test_file.py
๐ No more errors!
๐ ๏ธ Advanced Usage
Custom Error Detection
from smarttest import SmartTest
# Create custom instance
smarttest = SmartTest()
# Check specific file
results = smarttest.check_file('my_file.py')
# Stop monitoring
smarttest.stop()
Error Types
# Syntax errors
if line.count('(') != line.count(')'):
errors.append('Mismatched parentheses')
# Typos
if 'resut' in line and 'result' not in line:
errors.append('Typo detected')
# Invalid characters
if any(char in line for char in ['ุณุค', 'ุคุณ', 'ุด']):
errors.append('Invalid characters')
๐ Project Structure
smarttest/
โโโ __init__.py # Main library
โโโ auto_import.py # Auto dependency installer
โโโ terminal_interface.py # Beautiful terminal output
โโโ tester.py # Core testing engine
โโโ reporter.py # Report generation
๐ง Configuration
SmartTest works with minimal configuration:
# Auto-installs required packages
requirements = ['colorama']
# Monitors all Python files
patterns = ['*.py', '**/*.py']
# Fast checking interval
check_interval = 0.1 # seconds
๐ Performance
- โก Ultra Fast - 0.1 second check interval
- ๐พ Lightweight - Only 1 dependency (colorama)
- ๐ Efficient - Only checks modified files
- ๐ Smart - Avoids duplicate error reporting
๐ฏ Use Cases
Development
- Real-time error detection during coding
- Code quality monitoring
- Team development standards
Code Review
- Pre-commit error checking
- Automated quality assurance
- Continuous integration
Learning
- Educational tool for Python beginners
- Error pattern recognition
- Best practices enforcement
Development Setup
git clone https://github.com/En-Hussain/smarttest.git
cd smarttest
pip install -e .
python demo_smarttest.py
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Inspired by modern code analysis tools
- Built for the Python community
- Designed for simplicity and performance
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: hsn.nati3@gmail.com
๐ฎ Roadmap
- Web interface
- IDE integration
- Custom rule engine
- Team collaboration features
- Advanced reporting
Made with โค๏ธ for Python developers
SmartTest v1.0.1 - Making code better, one error at a time
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smarttest-1.0.1.tar.gz.
File metadata
- Download URL: smarttest-1.0.1.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7534036a74eac15bf414845a3a45a1660d2b79bb0b67e4f5035109309c4599
|
|
| MD5 |
7f523f1e8a221610d70e3a4b649f2704
|
|
| BLAKE2b-256 |
9917bf15f568a5bef473f487cbb1dead513dd7c13645e768291e1b916bc5a15a
|
File details
Details for the file smarttest-1.0.1-py3-none-any.whl.
File metadata
- Download URL: smarttest-1.0.1-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59193aaf814c92c54bc7c54d6fe27460c99294b83320097c62a4f0e17ac80244
|
|
| MD5 |
bd9221f9ce7c285181318721db418064
|
|
| BLAKE2b-256 |
c4f4409ab9a8faf559c4e199a56f3624e32361b48180dad1c4d944de55036a2f
|