From 48a847aa0fb0847edb32a23be06d50e64ea71d0e Mon Sep 17 00:00:00 2001 From: Sean Malley Date: Wed, 25 Oct 2017 23:40:22 -0700 Subject: [PATCH 1/5] clock: update tests to version 1.0.0 Added missing test version comment to match current tests cases. Verified test content order and completion. Closes #992 --- exercises/clock/clock_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercises/clock/clock_test.py b/exercises/clock/clock_test.py index 07b23e75c8..5007cd7370 100644 --- a/exercises/clock/clock_test.py +++ b/exercises/clock/clock_test.py @@ -2,6 +2,8 @@ from clock import Clock +# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.1 + class ClockTest(unittest.TestCase): # Test creating a new clock with an initial time. From 41ac842acb2c170e2d4b35c725a9234d3ea450f7 Mon Sep 17 00:00:00 2001 From: guaneec Date: Thu, 26 Oct 2017 23:06:29 +0800 Subject: [PATCH 2/5] two-bucket: Add version string Fixes #1009 --- exercises/two-bucket/two_bucket_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/two-bucket/two_bucket_test.py b/exercises/two-bucket/two_bucket_test.py index 5787ef82c7..8b0feb63f1 100644 --- a/exercises/two-bucket/two_bucket_test.py +++ b/exercises/two-bucket/two_bucket_test.py @@ -7,6 +7,7 @@ from two_bucket import two_bucket +# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 class TwoBucketTest(unittest.TestCase): def test_bucket_one_size_3_bucket_two_size_5_start_with_bucket_one(self): From 62fda116082f00413bc6fbeea033233ed2c2ea22 Mon Sep 17 00:00:00 2001 From: kishan Date: Thu, 26 Oct 2017 21:08:57 +0530 Subject: [PATCH 3/5] hamming: update tests to version 2.0.1 (#1031) * Updated correct Test Version 2.0.1 * Updated Tests --- exercises/hamming/hamming_test.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/hamming/hamming_test.py b/exercises/hamming/hamming_test.py index 15cd14bb72..77dc6823cf 100644 --- a/exercises/hamming/hamming_test.py +++ b/exercises/hamming/hamming_test.py @@ -3,10 +3,13 @@ import hamming -# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.1 class HammingTest(unittest.TestCase): + def test_empty_strands(self): + self.assertEqual(hamming.distance("", ""), 0) + def test_identical_strands(self): self.assertEqual(hamming.distance("A", "A"), 0) @@ -29,10 +32,10 @@ def test_small_distance_in_long_strands(self): self.assertEqual(hamming.distance("ACCAGGG", "ACTATGG"), 2) def test_non_unique_character_in_first_strand(self): - self.assertEqual(hamming.distance("AGA", "AGG"), 1) + self.assertEqual(hamming.distance("AAG", "AAA"), 1) def test_non_unique_character_in_second_strand(self): - self.assertEqual(hamming.distance("AGG", "AGA"), 1) + self.assertEqual(hamming.distance("AAA", "AAG"), 1) def test_same_nucleotides_in_different_positions(self): self.assertEqual(hamming.distance("TAG", "GAT"), 2) @@ -43,9 +46,6 @@ def test_large_distance(self): def test_large_distance_in_off_by_one_strand(self): self.assertEqual(hamming.distance("GGACGGATTCTG", "AGGACGGATTCT"), 9) - def test_empty_strands(self): - self.assertEqual(hamming.distance("", ""), 0) - def test_disallow_first_strand_longer(self): with self.assertRaises(ValueError): hamming.distance("AATG", "AAA") From 344ab6b8027be730824e9a4fb9053c92851e813d Mon Sep 17 00:00:00 2001 From: guaneec Date: Fri, 27 Oct 2017 00:30:00 +0800 Subject: [PATCH 4/5] two-bucket: Fix style --- exercises/two-bucket/two_bucket_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/exercises/two-bucket/two_bucket_test.py b/exercises/two-bucket/two_bucket_test.py index 8b0feb63f1..468c137b2b 100644 --- a/exercises/two-bucket/two_bucket_test.py +++ b/exercises/two-bucket/two_bucket_test.py @@ -5,6 +5,7 @@ import unittest + from two_bucket import two_bucket # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 From f78f1b75b97d3119f90b192db1b3441052260c00 Mon Sep 17 00:00:00 2001 From: guaneec Date: Fri, 27 Oct 2017 00:37:03 +0800 Subject: [PATCH 5/5] Fix style --- exercises/two-bucket/two_bucket_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/two-bucket/two_bucket_test.py b/exercises/two-bucket/two_bucket_test.py index 468c137b2b..8a1facc6b4 100644 --- a/exercises/two-bucket/two_bucket_test.py +++ b/exercises/two-bucket/two_bucket_test.py @@ -5,9 +5,9 @@ import unittest - from two_bucket import two_bucket + # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 class TwoBucketTest(unittest.TestCase):