Skip to content

Conversation

@wfahim
Copy link
Collaborator

@wfahim wfahim commented Nov 4, 2025

Description

Summary

Added unit tests for the functions of af_colours.py

Related Issues

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔧 Refactoring (no functional changes, no api changes)
  • ⚡ Performance improvement
  • 🧪 Test addition or improvement
  • 🔨 Build/CI changes
  • 🎨 Style/formatting changes

Changes Made

Testing

Test Coverage

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No tests needed (explain why below)

Testing Details

Test Cases:

  1. Test that requesting N colours from the categorical palette returns exactly N colours.
  2. Test that requesting 2 colours from the categorical palette returns the same result as the duo palette (for both HEX and RGB formats).
  3. Test that invalid inputs to af_colours correctly raise errors (invalid palette, invalid colour format, too few or too many colours).

Manual Testing Results:

Screenshots/Videos

Before

After

Breaking Changes

  • No breaking changes
  • Breaking changes (describe below)

Breaking Change Details:

Documentation

  • Documentation updated
  • README updated
  • No documentation changes needed

Documentation Changes:

Dependencies

  • No new dependencies
  • New dependencies added (list below)
  • Dependencies updated (list below)
  • Dependencies removed (list below)

Dependency Changes:

Checklist

Code Quality

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Code is properly commented
  • No unnecessary console.log/print statements
  • No commented-out code (unless intentionally documented)

Testing & Quality Assurance

  • Tests pass locally
  • Tests added for new functionality
  • Edge cases considered and tested
  • Error handling implemented where appropriate

@wfahim wfahim requested a review from nickhenden as a code owner November 4, 2025 11:16
@wfahim wfahim self-assigned this Nov 4, 2025
Copy link
Collaborator

@nickhenden nickhenden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All works fine now, thanks Fahim. Merge when you're ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants