Sha256: 41d2e93ed1899d36c8fc5418b00fbdf915946b0eadd3a38f4d05ac3b700390cc

Contents?: true

Size: 1.06 KB

Versions: 71

Compression:

Stored size: 1.06 KB

Contents

import unittest

from two_bucket import measure


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0

class TwoBucketTest(unittest.TestCase):
    def test_bucket_one_size_3_bucket_two_size_5_start_with_bucket_one(self):
        self.assertEqual(measure(3, 5, 1, "one"), (4, "one", 5))

    def test_bucket_one_size_3_bucket_two_size_5_start_with_bucket_two(self):
        self.assertEqual(measure(3, 5, 1, "two"), (8, "two", 3))

    def test_bucket_one_size_7_bucket_two_size_11_start_with_bucket_one(self):
        self.assertEqual(measure(7, 11, 2, "one"), (14, "one", 11))

    def test_bucket_one_size_7_bucket_two_size_11_start_with_bucket_two(self):
        self.assertEqual(measure(7, 11, 2, "two"), (18, "two", 7))

    def test_bucket_one_size_1_bucket_two_size_3_start_with_bucket_two(self):
        self.assertEqual(measure(1, 3, 3, "two"), (1, "two", 0))

    def test_bucket_one_size_2_bucket_two_size_3_start_with_bucket_one(self):
        self.assertEqual(measure(2, 3, 3, "one"), (2, "two", 2))


if __name__ == '__main__':
    unittest.main()

Version data entries

71 entries across 71 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.179 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.178 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.177 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.176 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.175 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.174 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.173 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.172 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.171 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.170 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.169 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.167 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.166 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.165 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.164 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.163 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.162 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.161 tracks/python/exercises/two-bucket/two_bucket_test.py
trackler-2.2.1.160 tracks/python/exercises/two-bucket/two_bucket_test.py