1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: fix version check.
This change is a Debian specific workaround needed for adjunction of
+ds repacking suffix, and probably needs to be removed once the repack
is not needed anymore, probably on next upstream revisions.
Author: Étienne Mollier <emollier@debian.org>
Forwarded: not-needed
Last-Update: 2024-08-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- brian.orig/brian2/tests/test_base.py
+++ brian/brian2/tests/test_base.py
@@ -1,3 +1,4 @@
+import re
import pytest
from numpy.testing import assert_equal
@@ -95,7 +96,7 @@
# Check that the version tuple is correct
version_tuple = brian2.__version_tuple__
- assert version_tuple == tuple(int(i) for i in version.split(".")[:4])
+ assert version_tuple == tuple(int(i) if i.isnumeric() else i for i in re.split(r"\.|\+", version))
if __name__ == "__main__":
|