Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Nov 9, 2025

This PR defines a more reusable testsuite to allow downstream packages like SUNRepresentations.jl or CategoryData.jl to have a more robust and up to date testing framework, without having to duplicate all of the code.

Additionally, since this package defines an interface, it does make sense that it should also define the tests to verify whether or not an implementation adheres to that interface.
Overall this should make it easier to define new sector types for which we are confident that they work with TensorKit.

I additionally added:

I've tested this, and at least locally the following workflow seems to work very well:

import TensorKitSectors
testsuite_path = joinpath(dirname(dirname(pathof(TensorKitSectors))), "test", "testsuite.jl")
include(testsuite_path)

using CategoryData
I = Object{CategoryData.Fib}

julia> SectorTestSuite.test_sector(I)
Test Summary: | Pass  Total  Time
Object{Fib}   |   94     94  2.0s

For now, I've left the multi-fusion tests for follow-up work, since this wasn't entirely obvious how to fit that in without making large changes, as there are quite a few hard-coded things in there.

@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lkdvos lkdvos marked this pull request as ready for review November 30, 2025 18:04
@lkdvos lkdvos requested review from Jutho and leburgel November 30, 2025 18:10
Copy link
Member

@Jutho Jutho left a comment

Choose a reason for hiding this comment

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

Looks perfect to me!

@lkdvos lkdvos merged commit 6f8ab3e into main Nov 30, 2025
10 checks passed
@lkdvos lkdvos deleted the ld-testsuite branch November 30, 2025 22:38
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