mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
* Initial plan * Add component-kind filtering to list_plugins and filter pipeline extensions to only show plugins with Command, EventListener, or Tool components Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> * fix: testing path --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RockChinQ <45992437+RockChinQ@users.noreply.github.com> Co-authored-by: Junyan Qin <rockchinq@gmail.com>
32 lines
684 B
Bash
Executable File
32 lines
684 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to run all unit tests
|
|
# This script helps avoid circular import issues by setting up the environment properly
|
|
|
|
set -e
|
|
|
|
echo "Setting up test environment..."
|
|
|
|
# Activate virtual environment if it exists
|
|
if [ -d ".venv" ]; then
|
|
source .venv/bin/activate
|
|
fi
|
|
|
|
# Check if pytest is installed
|
|
if ! command -v pytest &> /dev/null; then
|
|
echo "Installing test dependencies..."
|
|
pip install pytest pytest-asyncio pytest-cov
|
|
fi
|
|
|
|
echo "Running all unit tests..."
|
|
|
|
# Run tests with coverage
|
|
pytest tests/unit_tests/ -v --tb=short \
|
|
--cov=langbot \
|
|
--cov-report=xml \
|
|
"$@"
|
|
|
|
echo ""
|
|
echo "Test run complete!"
|
|
echo "Coverage report saved to coverage.xml"
|