LeetSuite
Leet stuff
Example usage
In your leet solution file:
In-place solutions:
...
if __name__ == "__main__":
from leet.test_suite import Submission, Case
cases = [
Case(
matrix=[[5,1,9,11],[2,4,8,10],[13,3,6,7],[15,14,12,16]],
solution=[[15,13,2,5],[14,3,4,1],[12,6,8,9],[16,7,10,11]],
),
]
sub = Submission(
callable=Solution().rotate,
cases=cases,
inplace=True,
throw=False,
verbose=True
)
sub.run(inplace_arg="matrix")
Not in-place
...
if __name__ == "__main__":
from leet.test_suite import Submission, Case
# from leet.test_suite.comparators import nested_list_comparator
cases = [
Case(x=2.00000, n=10, solution=1024.00000).disable_from_here(), # disable this case and all following ones ...
Case(x=2.10000, n=3, solution=9.26100).enable() # enable this one,
Case(x=2.00000, n=-2, solution=0.25).enable_from_here(), # enabled from here (including this case)
Case(x=8.66731, n=4, solution=5643.35434, enabled=False), # and disabled using arg
]
sub = Submission(
callable=Solution().myPow,
cases=cases,
inplace=False,
throw=False,
verbose=True
)
sub.run(comparator=lambda x, y: round(x, 3) == round(y, 3))
Nested-list comparison
...
if __name__ == "__main__":
from leet.test_suite import Submission, Case
from leet.test_suite.comparators import nested_list_comparator
cases = [
Case(
strs=["eat", "tea", "tan", "ate", "nat", "bat"],
solution=[["bat"], ["nat","tan"], ["ate","eat","tea"]],
).disable(), # Disable a case
Case(
strs=["","b"],
solution=[["b"], [""]],
)
]
sub = Submission(
callable=Solution().groupAnagrams,
cases=cases,
inplace=False,
throw=False,
verbose=True
)
sub.run(comparator=nested_list_comparator)
Metadata
Release files for leet-suite 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| leet_suite-0.1.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| leet_suite-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / leet_suite-0.1.0.tar.gz
| Download URL | leet_suite-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee81adf737df63b1358c31404a43c8c14bd0a026978909f7400d2652af15923e
|
|
BLAKE2b-256 checksum How to use checksums |
99fadc1d34801f217e98b3f544260964cb1d47d0435e2eee5fa7831a2ba4f933
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2025.
Transparency logRelease files / leet_suite-0.1.0-py3-none-any.whl
| Download URL | leet_suite-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e76c0ea08922fe457a4167b7b5e226c808885119a468f7d281854b182ab9dd4
|
|
BLAKE2b-256 checksum How to use checksums |
0bc1c77c794186b9172ffaa150ca7051d282929133bc0b2c6dc6ac6273f6492c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2025.
Transparency log