mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Yay, i taught it to sort!
This commit is contained in:
parent
dca85dc1a2
commit
6b7307a8c5
1 changed files with 4 additions and 2 deletions
|
|
@ -7,6 +7,8 @@ import io
|
|||
import os
|
||||
import pathlib
|
||||
|
||||
from distutils.version import StrictVersion
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
|
|
@ -31,7 +33,7 @@ class TestPluginManagerMetadata(unittest.TestCase):
|
|||
versions = list(self.content["versions"].items())
|
||||
sorted_versions = sorted(
|
||||
versions,
|
||||
key=lambda version: version[0],
|
||||
key=lambda version: StrictVersion(version[0]),
|
||||
reverse=True,
|
||||
)
|
||||
assert sorted_versions == versions
|
||||
|
|
@ -103,7 +105,7 @@ class BaseCategoryMetadataTestCases:
|
|||
versions = list(plugin_metadata["versions"].items())
|
||||
sorted_versions = sorted(
|
||||
versions,
|
||||
key=lambda version: version[0],
|
||||
key=lambda version: StrictVersion(version[0]),
|
||||
reverse=True,
|
||||
)
|
||||
self.assertEqual(sorted_versions, versions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue