Created
April 30, 2024 20:06
-
-
Save seansummers/f6cfb1282de91eb2bfb09cfe3c8675ba to your computer and use it in GitHub Desktop.
Python Test Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
def most_recent_first(versions: List[str]) -> List[str]: | |
"""Return the list of SemVers sorted by the newest first. | |
>>> versions = ['0.1.0','3.2.1','2.2.3','0.1.1','2.15.3'] | |
>>> most_recent_first(versions) | |
['3.2.1', '2.15.3', '2.2.3', '0.1.1', '0.1.0'] | |
""" | |
import doctest | |
doctest.testmod() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment