Skip to content

Commit 232d172

Browse files
author
ajohns
committed
-added test which catches failure described in issue #458
1 parent 7e19866 commit 232d172

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/rez/tests/test_packages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,22 @@ def _test(orderer, package_name, expected_order):
339339

340340
null_orderer = NullPackageOrder()
341341
split_orderer = VersionSplitPackageOrder(Version("2.6.0"))
342+
# after v1.1.0 and before v1.1.1
342343
timestamp_orderer = TimestampPackageOrder(timestamp=3001, rank=3)
344+
# after v2.1.0 and before v2.1.5
345+
timestamp2_orderer = TimestampPackageOrder(timestamp=7001, rank=3)
343346

344347
expected_null_result = ["7", "6", "5"]
345348
expected_split_result = ["2.6.0", "2.5.2", "2.7.0", "2.6.8"]
346349
expected_timestamp_result = ["1.1.1", "1.1.0", "1.0.6", "1.0.5",
347350
"1.2.0", "2.0.0", "2.1.5", "2.1.0"]
351+
expected_timestamp2_result = ["2.1.5", "2.1.0", "2.0.0", "1.2.0",
352+
"1.1.1", "1.1.0", "1.0.6", "1.0.5"]
348353

349354
_test(null_orderer, "pysplit", expected_null_result)
350355
_test(split_orderer, "python", expected_split_result)
351356
_test(timestamp_orderer, "timestamped", expected_timestamp_result)
357+
_test(timestamp2_orderer, "timestamped", expected_timestamp2_result)
352358

353359
fam_orderer = PerFamilyOrder(
354360
order_dict=dict(pysplit=null_orderer,

0 commit comments

Comments
 (0)