Nicotine+ uses comprehensive testing to ensure code quality and cross-platform compatibility. All changes must pass unit tests, integration tests, and code quality checks.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nicotine-plus/nicotine-plus/llms.txt
Use this file to discover all available pages before exploring further.
Continuous Integration
It is important that all changes pass unit and integration testing. Continuous integration (CI) is implemented using GitHub Actions workflows, which run tests on various platforms for each commit.Running Tests Locally
Unit and Integration Tests
Run the test suite using Python’s unittest module:Tests are defined in the
pynicotine/tests/ folder and should be expanded to cover larger parts of the client when possible.Code Style Checks
Verify code follows style guidelines using pycodestyle:Code Linting
Perform static code analysis using Pylint:Build Testing
Test that the application builds correctly:Test Categories
- Unit Tests
- Integration Tests
- Code Quality
Unit tests verify individual components and functions in isolation.Location: Tests cover:
pynicotine/tests/Run Command:- Protocol message parsing
- Configuration management
- Data structure operations
- Utility functions
Creating Tests
When adding new functionality or fixing bugs, expand the test coverage:Identify test location
Find or create the appropriate test file in
pynicotine/tests/ that corresponds to your changesManual Testing Platforms
Before releases, maintainers ensure Nicotine+ works on these platforms:- Windows - Latest version
- macOS - Latest version
- Ubuntu 18.04 - Oldest supported GTK 3 and Python 3 versions
- Ubuntu 22.04 - Oldest supported GTK 4 version
- Latest Ubuntu/Fedora - Current stable releases
You don’t need to test on all platforms for typical contributions, but be aware that CI tests across multiple operating systems and Python versions.
Testing Development Builds
Test your changes using various installation methods:Git Development Build
The recommended method for active development:Pip Install from Git
Test installation from Git:Profiling and Performance Testing
Use py-spy for real-time performance profiling:Profiler output shows real-time CPU usage by function, helping identify performance issues before they become problems.
Debug Testing
Enable verbose debug logging during testing:Enable log categories
Right-click the log pane and select categories:
- Connections - Network operations
- Messages - Protocol messages
- Transfers - File transfers
- Miscellaneous - General debug messages
Pre-Commit Checklist
Before committing changes, verify:Testing Translation Updates
When modifying translatable strings:Weblate handles translation updates automatically via pull requests. Use “Create a merge commit” when merging to preserve translator attribution.
Continuous Integration Details
GitHub Actions automatically runs:- Unit tests on multiple Python versions
- Integration tests across Windows, macOS, and Linux
- Code style checks with pycodestyle
- Linting with Pylint
- Build tests to verify packaging
- Platform-specific installers for Windows and macOS
CI test results appear on pull requests and commits. All checks must pass before changes can be merged.
Unstable Build Testing
Test the latest unstable builds across platforms:GNU/Linux
Windows and macOS
Unstable installers are built automatically after each commit:- Windows x64/ARM64 installers and portable packages
- macOS Intel/Apple Silicon installers
Next Steps
- Review Development Overview for best practices
- Understand the Architecture for deeper insights
- Check Setup for dependency information