Skip to content

Commit 91eccfb

Browse files
authored
[Variable Length Quantity]: Updated tests.toml & Regenerated Test Cases (#3969)
* Updated tests.toml and regenerated test cases. * Regenerated tests under Python 3.11.5, since 3.13.2 was causing CI failure.
1 parent aa0aa58 commit 91eccfb

File tree

2 files changed

+67
-30
lines changed

2 files changed

+67
-30
lines changed
Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,103 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[35c9db2e-f781-4c52-b73b-8e76427defd0]
6-
description = "zero"
13+
description = "Encode a series of integers, producing a series of bytes. -> zero"
714

815
[be44d299-a151-4604-a10e-d4b867f41540]
9-
description = "arbitrary single byte"
16+
description = "Encode a series of integers, producing a series of bytes. -> arbitrary single byte"
17+
18+
[890bc344-cb80-45af-b316-6806a6971e81]
19+
description = "Encode a series of integers, producing a series of bytes. -> asymmetric single byte"
1020

1121
[ea399615-d274-4af6-bbef-a1c23c9e1346]
12-
description = "largest single byte"
22+
description = "Encode a series of integers, producing a series of bytes. -> largest single byte"
1323

1424
[77b07086-bd3f-4882-8476-8dcafee79b1c]
15-
description = "smallest double byte"
25+
description = "Encode a series of integers, producing a series of bytes. -> smallest double byte"
1626

1727
[63955a49-2690-4e22-a556-0040648d6b2d]
18-
description = "arbitrary double byte"
28+
description = "Encode a series of integers, producing a series of bytes. -> arbitrary double byte"
29+
30+
[4977d113-251b-4d10-a3ad-2f5a7756bb58]
31+
description = "Encode a series of integers, producing a series of bytes. -> asymmetric double byte"
1932

2033
[29da7031-0067-43d3-83a7-4f14b29ed97a]
21-
description = "largest double byte"
34+
description = "Encode a series of integers, producing a series of bytes. -> largest double byte"
2235

2336
[3345d2e3-79a9-4999-869e-d4856e3a8e01]
24-
description = "smallest triple byte"
37+
description = "Encode a series of integers, producing a series of bytes. -> smallest triple byte"
2538

2639
[5df0bc2d-2a57-4300-a653-a75ee4bd0bee]
27-
description = "arbitrary triple byte"
40+
description = "Encode a series of integers, producing a series of bytes. -> arbitrary triple byte"
41+
42+
[6731045f-1e00-4192-b5ae-98b22e17e9f7]
43+
description = "Encode a series of integers, producing a series of bytes. -> asymmetric triple byte"
2844

2945
[f51d8539-312d-4db1-945c-250222c6aa22]
30-
description = "largest triple byte"
46+
description = "Encode a series of integers, producing a series of bytes. -> largest triple byte"
3147

3248
[da78228b-544f-47b7-8bfe-d16b35bbe570]
33-
description = "smallest quadruple byte"
49+
description = "Encode a series of integers, producing a series of bytes. -> smallest quadruple byte"
3450

3551
[11ed3469-a933-46f1-996f-2231e05d7bb6]
36-
description = "arbitrary quadruple byte"
52+
description = "Encode a series of integers, producing a series of bytes. -> arbitrary quadruple byte"
53+
54+
[b45ef770-cbba-48c2-bd3c-c6362679516e]
55+
description = "Encode a series of integers, producing a series of bytes. -> asymmetric quadruple byte"
3756

3857
[d5f3f3c3-e0f1-4e7f-aad0-18a44f223d1c]
39-
description = "largest quadruple byte"
58+
description = "Encode a series of integers, producing a series of bytes. -> largest quadruple byte"
4059

4160
[91a18b33-24e7-4bfb-bbca-eca78ff4fc47]
42-
description = "smallest quintuple byte"
61+
description = "Encode a series of integers, producing a series of bytes. -> smallest quintuple byte"
4362

4463
[5f34ff12-2952-4669-95fe-2d11b693d331]
45-
description = "arbitrary quintuple byte"
64+
description = "Encode a series of integers, producing a series of bytes. -> arbitrary quintuple byte"
65+
66+
[9be46731-7cd5-415c-b960-48061cbc1154]
67+
description = "Encode a series of integers, producing a series of bytes. -> asymmetric quintuple byte"
4668

4769
[7489694b-88c3-4078-9864-6fe802411009]
48-
description = "maximum 32-bit integer input"
70+
description = "Encode a series of integers, producing a series of bytes. -> maximum 32-bit integer input"
4971

5072
[f9b91821-cada-4a73-9421-3c81d6ff3661]
51-
description = "two single-byte values"
73+
description = "Encode a series of integers, producing a series of bytes. -> two single-byte values"
5274

5375
[68694449-25d2-4974-ba75-fa7bb36db212]
54-
description = "two multi-byte values"
76+
description = "Encode a series of integers, producing a series of bytes. -> two multi-byte values"
5577

5678
[51a06b5c-de1b-4487-9a50-9db1b8930d85]
57-
description = "many multi-byte values"
79+
description = "Encode a series of integers, producing a series of bytes. -> many multi-byte values"
5880

5981
[baa73993-4514-4915-bac0-f7f585e0e59a]
60-
description = "one byte"
82+
description = "Decode a series of bytes, producing a series of integers. -> one byte"
6183

6284
[72e94369-29f9-46f2-8c95-6c5b7a595aee]
63-
description = "two bytes"
85+
description = "Decode a series of bytes, producing a series of integers. -> two bytes"
6486

6587
[df5a44c4-56f7-464e-a997-1db5f63ce691]
66-
description = "three bytes"
88+
description = "Decode a series of bytes, producing a series of integers. -> three bytes"
6789

6890
[1bb58684-f2dc-450a-8406-1f3452aa1947]
69-
description = "four bytes"
91+
description = "Decode a series of bytes, producing a series of integers. -> four bytes"
7092

7193
[cecd5233-49f1-4dd1-a41a-9840a40f09cd]
72-
description = "maximum 32-bit integer"
94+
description = "Decode a series of bytes, producing a series of integers. -> maximum 32-bit integer"
7395

7496
[e7d74ba3-8b8e-4bcb-858d-d08302e15695]
75-
description = "incomplete sequence causes error"
97+
description = "Decode a series of bytes, producing a series of integers. -> incomplete sequence causes error"
7698

7799
[aa378291-9043-4724-bc53-aca1b4a3fcb6]
78-
description = "incomplete sequence causes error, even if value is zero"
100+
description = "Decode a series of bytes, producing a series of integers. -> incomplete sequence causes error, even if value is zero"
79101

80102
[a91e6f5a-c64a-48e3-8a75-ce1a81e0ebee]
81-
description = "multiple values"
103+
description = "Decode a series of bytes, producing a series of integers. -> multiple values"

exercises/practice/variable-length-quantity/variable_length_quantity_test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These tests are auto-generated with test data from:
22
# https://github.com/exercism/problem-specifications/tree/main/exercises/variable-length-quantity/canonical-data.json
3-
# File last updated on 2023-07-19
3+
# File last updated on 2025-08-28
44

55
import unittest
66

@@ -17,6 +17,9 @@ def test_zero(self):
1717
def test_arbitrary_single_byte(self):
1818
self.assertEqual(encode([0x40]), [0x40])
1919

20+
def test_asymmetric_single_byte(self):
21+
self.assertEqual(encode([0x53]), [0x53])
22+
2023
def test_largest_single_byte(self):
2124
self.assertEqual(encode([0x7F]), [0x7F])
2225

@@ -26,6 +29,9 @@ def test_smallest_double_byte(self):
2629
def test_arbitrary_double_byte(self):
2730
self.assertEqual(encode([0x2000]), [0xC0, 0x0])
2831

32+
def test_asymmetric_double_byte(self):
33+
self.assertEqual(encode([0xAD]), [0x81, 0x2D])
34+
2935
def test_largest_double_byte(self):
3036
self.assertEqual(encode([0x3FFF]), [0xFF, 0x7F])
3137

@@ -35,6 +41,9 @@ def test_smallest_triple_byte(self):
3541
def test_arbitrary_triple_byte(self):
3642
self.assertEqual(encode([0x100000]), [0xC0, 0x80, 0x0])
3743

44+
def test_asymmetric_triple_byte(self):
45+
self.assertEqual(encode([0x1D59C]), [0x87, 0xAB, 0x1C])
46+
3847
def test_largest_triple_byte(self):
3948
self.assertEqual(encode([0x1FFFFF]), [0xFF, 0xFF, 0x7F])
4049

@@ -44,6 +53,9 @@ def test_smallest_quadruple_byte(self):
4453
def test_arbitrary_quadruple_byte(self):
4554
self.assertEqual(encode([0x8000000]), [0xC0, 0x80, 0x80, 0x0])
4655

56+
def test_asymmetric_quadruple_byte(self):
57+
self.assertEqual(encode([0x357704]), [0x81, 0xD5, 0xEE, 0x4])
58+
4759
def test_largest_quadruple_byte(self):
4860
self.assertEqual(encode([0xFFFFFFF]), [0xFF, 0xFF, 0xFF, 0x7F])
4961

@@ -53,6 +65,9 @@ def test_smallest_quintuple_byte(self):
5365
def test_arbitrary_quintuple_byte(self):
5466
self.assertEqual(encode([0xFF000000]), [0x8F, 0xF8, 0x80, 0x80, 0x0])
5567

68+
def test_asymmetric_quintuple_byte(self):
69+
self.assertEqual(encode([0x86656105]), [0x88, 0xB3, 0x95, 0xC2, 0x5])
70+
5671
def test_maximum_32_bit_integer_input(self):
5772
self.assertEqual(encode([0xFFFFFFFF]), [0x8F, 0xFF, 0xFF, 0xFF, 0x7F])
5873

0 commit comments

Comments
 (0)