aboutsummaryrefslogtreecommitdiffstats
path: root/tests/README.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/README.md84
1 files changed, 0 insertions, 84 deletions
diff --git a/tests/README.md b/tests/README.md
deleted file mode 100644
index 77b832c..0000000
--- a/tests/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
1# Test Suite Coverage
2
3This document tracks the test coverage for Senator Sperma bot.
4
5## Running Tests
6
7```bash
8pytest tests/ -v
9```
10
11## Coverage by Cog
12
13| Cog | Test File | Tests | Coverage |
14|-----|-----------|-------|----------|
15| **say.py** | test_say.py | 3 | Basic command execution, empty text, long text |
16| **web.py** | test_web.py | 3 | Success, no results, HTTP error |
17| **qr.py** | test_qr.py | 4 | Generate, empty text, decode unavailable, download failure |
18| **math_commands.py** | test_math_commands.py | 3 | Valid expression, invalid expression, process error |
19| **ai.py** | test_ai.py | 3 | Success, empty choices, no choices key |
20| **downloader.py** | test_downloader.py | 5 | File success, URL success, error, message with/without URL |
21| **search.py** | test_search.py | 5 | Success, no cache, file not found, empty filename, autocomplete |
22| **tts.py** | test_tts.py | 3 | File output, voice output not in channel, error handling |
23| **trigger.py** | test_trigger.py | 5 | Create, add, add not found, delete, help |
24| **compression.py** | test_compression_conversion.py | 4 | Filetype detection, get compression commands |
25| **conversion.py** | test_compression_conversion.py | 5 | Build conversion commands, cleanup |
26| **plot.py** | test_plot.py | 6 | Parse expression, is implicit, parse implicit, command execution |
27| **vclogs.py** | test_vclogs.py | 7 | Format duration, load/save activity, state change handlers |
28| **voice.py** | test_voice.py | 5 | Get manager, join channel, get status, stop |
29| **music/join.py** | test_music_join.py | 1 | Join command success |
30| **music/stop.py** | test_music_join.py | 1 | Stop command success |
31| **music/play_commands.py** | test_music_play.py | 4 | Search embed, validation errors |
32| **music/loop.py** | test_music_play.py | 2 | Is looping, toggle |
33| **music/audio_playback.py** | test_music_audio.py | 8 | Validate voice, prepare source, cleanup |
34| **assistant.py** | test_assistant.py | 4 | Keyword, on_message filtering, mentions |
35
36## Test Structure
37
38```
39tests/
40├── conftest.py # Shared fixtures and mock classes
41├── cogs/
42│ ├── test_say.py
43│ ├── test_web.py
44│ ├── test_qr.py
45│ ├── test_math_commands.py
46│ ├── test_ai.py
47│ ├── test_downloader.py
48│ ├── test_search.py
49│ ├── test_tts.py
50│ ├── test_trigger.py
51│ ├── test_compression_conversion.py
52│ ├── test_plot.py
53│ ├── test_vclogs.py
54│ ├── test_voice.py
55│ ├── test_music_join.py
56│ ├── test_music_play.py
57│ ├── test_music_audio.py
58│ └── test_assistant.py
59└── README.md # This file
60```
61
62## Mock Classes
63
64The test suite uses custom mock classes defined in `conftest.py`:
65
66- `MockUser` - Simulates Discord user
67- `MockChannel` / `MockTextChannel` / `MockVoiceChannel` - Simulates Discord channels
68- `MockGuild` - Simulates Discord guild
69- `MockMessage` - Simulates Discord message
70- `MockInteraction` - Simulates Discord interaction
71- `MockApplicationContext` - Simulates slash command context
72
73## Test Categories
74
751. **Unit tests** - Test individual functions and methods
762. **Integration tests** - Test command execution with mocked dependencies
773. **Error handling tests** - Test error conditions and edge cases
78
79## Notes
80
81- External services (OpenAI, yt-dlp, ffmpeg) are mocked
82- Database operations in trigger.py are mocked
83- File system operations are mocked where needed
84- Some tests may require specific environment variables to be set (mocked) \ No newline at end of file