Skip to main content

Intelligent Python code testing library with real-time error detection

Project description

SmartTest - Intelligent Code Testing Library

Python Version License Downloads Version

๐Ÿš€ 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

  1. Auto Launch - SmartTest starts automatically when imported
  2. File Scanning - Scans all .py files in your project
  3. Real-time Monitoring - Watches for file changes every 0.1 seconds
  4. Error Detection - Instantly detects and displays errors
  5. 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

๐Ÿ”ฎ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smarttest-1.0.1.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smarttest-1.0.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

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

Hashes for smarttest-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9c7534036a74eac15bf414845a3a45a1660d2b79bb0b67e4f5035109309c4599
MD5 7f523f1e8a221610d70e3a4b649f2704
BLAKE2b-256 9917bf15f568a5bef473f487cbb1dead513dd7c13645e768291e1b916bc5a15a

See more details on using hashes here.

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

Hashes for smarttest-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59193aaf814c92c54bc7c54d6fe27460c99294b83320097c62a4f0e17ac80244
MD5 bd9221f9ce7c285181318721db418064
BLAKE2b-256 c4f4409ab9a8faf559c4e199a56f3624e32361b48180dad1c4d944de55036a2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page