From 53bd5093c21f5aa73133d17106613c084720093e Mon Sep 17 00:00:00 2001 From: Corey McCandless Date: Tue, 12 Jun 2018 10:03:16 -0400 Subject: [PATCH] Normalize test case names --- exercises/all-your-base/all_your_base_test.py | 2 +- exercises/allergies/allergies_test.py | 2 +- exercises/alphametics/alphametics_test.py | 2 +- exercises/anagram/anagram_test.py | 2 +- exercises/armstrong-numbers/armstrong_numbers_test.py | 2 +- exercises/bank-account/bank_account_test.py | 2 +- exercises/beer-song/beer_song_test.py | 2 +- exercises/binary-search-tree/binary_search_tree_test.py | 2 +- exercises/binary-search/binary_search_test.py | 2 +- exercises/binary/binary_test.py | 2 +- exercises/bob/bob_test.py | 2 +- exercises/book-store/book_store_test.py | 2 +- exercises/bowling/bowling_test.py | 2 +- exercises/bracket-push/bracket_push_test.py | 2 +- exercises/collatz-conjecture/collatz_conjecture_test.py | 2 +- exercises/diamond/diamond_test.py | 2 +- exercises/etl/etl_test.py | 2 +- exercises/flatten-array/flatten_array_test.py | 2 +- exercises/grade-school/grade_school_test.py | 2 +- exercises/hello-world/hello_world_test.py | 2 +- exercises/house/house_test.py | 2 +- exercises/isbn-verifier/isbn_verifier_test.py | 2 +- exercises/isogram/isogram_test.py | 2 +- exercises/kindergarten-garden/kindergarten_garden_test.py | 2 +- .../largest-series-product/largest_series_product_test.py | 2 +- exercises/leap/leap_test.py | 2 +- exercises/linked-list/linked_list_test.py | 2 +- exercises/luhn/luhn_test.py | 2 +- exercises/markdown/markdown_test.py | 2 +- exercises/nth-prime/nth_prime_test.py | 2 +- exercises/nucleotide-count/nucleotide_count_test.py | 2 +- exercises/ocr-numbers/ocr_numbers_test.py | 2 +- exercises/palindrome-products/palindrome_products_test.py | 2 +- exercises/pangram/pangram_test.py | 2 +- exercises/phone-number/phone_number_test.py | 2 +- exercises/pig-latin/pig_latin_test.py | 2 +- exercises/point-mutations/point_mutations_test.py | 2 +- exercises/protein-translation/protein_translation_test.py | 2 +- exercises/rail-fence-cipher/rail_fence_cipher_test.py | 2 +- exercises/rational-numbers/rational_numbers_test.py | 2 +- exercises/react/react_test.py | 2 +- exercises/rectangles/rectangles_test.py | 2 +- exercises/reverse-string/reverse_string_test.py | 2 +- exercises/rna-transcription/rna_transcription_test.py | 2 +- exercises/robot-name/robot_name_test.py | 2 +- exercises/robot-simulator/robot_simulator_test.py | 2 +- exercises/roman-numerals/roman_numerals_test.py | 2 +- exercises/rotational-cipher/rotational_cipher_test.py | 2 +- exercises/run-length-encoding/run_length_encoding_test.py | 2 +- exercises/saddle-points/saddle_points_test.py | 2 +- exercises/scrabble-score/scrabble_score_test.py | 2 +- exercises/secret-handshake/secret_handshake_test.py | 2 +- exercises/simple-cipher/simple_cipher_test.py | 2 +- exercises/simple-linked-list/simple_linked_list_test.py | 2 +- exercises/tournament/tournament_test.py | 2 +- exercises/transpose/transpose_test.py | 2 +- exercises/tree-building/tree_building_test.py | 2 +- exercises/twelve-days/twelve_days_test.py | 4 +--- exercises/two-fer/two_fer_test.py | 2 +- .../variable-length-quantity/variable_length_quantity_test.py | 2 +- exercises/word-count/word_count_test.py | 2 +- exercises/word-search/word_search_test.py | 2 +- exercises/yacht/yacht_test.py | 2 +- 63 files changed, 63 insertions(+), 65 deletions(-) diff --git a/exercises/all-your-base/all_your_base_test.py b/exercises/all-your-base/all_your_base_test.py index 022d62f73aa..4ebf657c885 100644 --- a/exercises/all-your-base/all_your_base_test.py +++ b/exercises/all-your-base/all_your_base_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.3.0 -class AllYourBaseTests(unittest.TestCase): +class AllYourBaseTest(unittest.TestCase): def test_single_bit_to_one_decimal(self): self.assertEqual(rebase(2, [1], 10), [1]) diff --git a/exercises/allergies/allergies_test.py b/exercises/allergies/allergies_test.py index d8d8ffb566b..dbc898fbf17 100644 --- a/exercises/allergies/allergies_test.py +++ b/exercises/allergies/allergies_test.py @@ -9,7 +9,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class AllergiesTests(unittest.TestCase): +class AllergiesTest(unittest.TestCase): def test_no_allergies_means_not_allergic(self): allergies = Allergies(0) self.assertIs(allergies.is_allergic_to('peanuts'), False) diff --git a/exercises/alphametics/alphametics_test.py b/exercises/alphametics/alphametics_test.py index be4899c5bc4..ef359154ba9 100644 --- a/exercises/alphametics/alphametics_test.py +++ b/exercises/alphametics/alphametics_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class TestAlphametics(unittest.TestCase): +class AlphameticsTest(unittest.TestCase): def test_puzzle_with_three_letters(self): self.assertEqual(solve("I + BB == ILL"), {"I": 1, "B": 9, "L": 0}) diff --git a/exercises/anagram/anagram_test.py b/exercises/anagram/anagram_test.py index a9021e37c20..d2f65969faf 100644 --- a/exercises/anagram/anagram_test.py +++ b/exercises/anagram/anagram_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class AnagramTests(unittest.TestCase): +class AnagramTest(unittest.TestCase): def test_no_matches(self): candidates = ["hello", "world", "zombies", "pants"] self.assertEqual(detect_anagrams("diaper", candidates), []) diff --git a/exercises/armstrong-numbers/armstrong_numbers_test.py b/exercises/armstrong-numbers/armstrong_numbers_test.py index a77c2420c40..ec52be9a76d 100644 --- a/exercises/armstrong-numbers/armstrong_numbers_test.py +++ b/exercises/armstrong-numbers/armstrong_numbers_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 -class ArmstrongTests(unittest.TestCase): +class ArmstrongNumbersTest(unittest.TestCase): def test_single_digit_numbers_are_armstrong_numbers(self): self.assertIs(is_armstrong(5), True) diff --git a/exercises/bank-account/bank_account_test.py b/exercises/bank-account/bank_account_test.py index 8879c76b186..b16dd66a804 100644 --- a/exercises/bank-account/bank_account_test.py +++ b/exercises/bank-account/bank_account_test.py @@ -6,7 +6,7 @@ from bank_account import BankAccount -class BankAccountTests(unittest.TestCase): +class BankAccountTest(unittest.TestCase): def setUp(self): self.account = BankAccount() diff --git a/exercises/beer-song/beer_song_test.py b/exercises/beer-song/beer_song_test.py index 65d402ce198..42715ed9bf7 100644 --- a/exercises/beer-song/beer_song_test.py +++ b/exercises/beer-song/beer_song_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.1.0 -class BeerTest(unittest.TestCase): +class BeerSongTest(unittest.TestCase): def test_first_generic_verse(self): expected = [ "99 bottles of beer on the wall, 99 bottles of beer.", diff --git a/exercises/binary-search-tree/binary_search_tree_test.py b/exercises/binary-search-tree/binary_search_tree_test.py index 4051d101021..658bcaa296b 100644 --- a/exercises/binary-search-tree/binary_search_tree_test.py +++ b/exercises/binary-search-tree/binary_search_tree_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 -class BinarySearchTreeTests(unittest.TestCase): +class BinarySearchTreeTest(unittest.TestCase): def test_data_is_retained(self): expected = TreeNode('4', None, None) diff --git a/exercises/binary-search/binary_search_test.py b/exercises/binary-search/binary_search_test.py index 36b50aa06fe..c3bd410286f 100644 --- a/exercises/binary-search/binary_search_test.py +++ b/exercises/binary-search/binary_search_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class BinarySearchTests(unittest.TestCase): +class BinarySearchTest(unittest.TestCase): def test_finds_value_in_array_with_one_element(self): self.assertEqual(binary_search([6], 6), 0) diff --git a/exercises/binary/binary_test.py b/exercises/binary/binary_test.py index bc7b487d11b..578fdccbe66 100644 --- a/exercises/binary/binary_test.py +++ b/exercises/binary/binary_test.py @@ -9,7 +9,7 @@ from binary import parse_binary -class BinaryTests(unittest.TestCase): +class BinaryTest(unittest.TestCase): def test_binary_1_is_decimal_1(self): self.assertEqual(parse_binary("1"), 1) diff --git a/exercises/bob/bob_test.py b/exercises/bob/bob_test.py index 0d44a1a7109..52e1954a0f8 100644 --- a/exercises/bob/bob_test.py +++ b/exercises/bob/bob_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class BobTests(unittest.TestCase): +class BobTest(unittest.TestCase): def test_stating_something(self): self.assertEqual(bob.hey("Tom-ay-to, tom-aaaah-to."), "Whatever.") diff --git a/exercises/book-store/book_store_test.py b/exercises/book-store/book_store_test.py index 56299ccf880..47d8d631fcd 100644 --- a/exercises/book-store/book_store_test.py +++ b/exercises/book-store/book_store_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0 -class BookStoreTests(unittest.TestCase): +class BookStoreTest(unittest.TestCase): def test_only_a_single_book(self): self.assertEqual(calculate_total([1]), 800) diff --git a/exercises/bowling/bowling_test.py b/exercises/bowling/bowling_test.py index 67f8f6b6517..5e77e0bb643 100644 --- a/exercises/bowling/bowling_test.py +++ b/exercises/bowling/bowling_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class BowlingTests(unittest.TestCase): +class BowlingTest(unittest.TestCase): def roll(self, rolls): [self.game.roll(roll) for roll in rolls] diff --git a/exercises/bracket-push/bracket_push_test.py b/exercises/bracket-push/bracket_push_test.py index 19b7790f845..e396241252c 100644 --- a/exercises/bracket-push/bracket_push_test.py +++ b/exercises/bracket-push/bracket_push_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0 -class BracketPushTests(unittest.TestCase): +class BracketPushTest(unittest.TestCase): def test_paired_square_brackets(self): self.assertEqual(is_paired("[]"), True) diff --git a/exercises/collatz-conjecture/collatz_conjecture_test.py b/exercises/collatz-conjecture/collatz_conjecture_test.py index f92c99ace59..ae573f79979 100644 --- a/exercises/collatz-conjecture/collatz_conjecture_test.py +++ b/exercises/collatz-conjecture/collatz_conjecture_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class CollatzConjectureTests(unittest.TestCase): +class CollatzConjectureTest(unittest.TestCase): def test_zero_steps_for_one(self): self.assertEqual(collatz_steps(1), 0) diff --git a/exercises/diamond/diamond_test.py b/exercises/diamond/diamond_test.py index 06d0d116ada..7e0fee10b03 100644 --- a/exercises/diamond/diamond_test.py +++ b/exercises/diamond/diamond_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class DiamondTests(unittest.TestCase): +class DiamondTest(unittest.TestCase): def test_degenerate_case_with_a_single_row(self): self.assertMultiLineEqual(make_diamond('A'), 'A\n') diff --git a/exercises/etl/etl_test.py b/exercises/etl/etl_test.py index 7036f5219cc..e949c9181e7 100644 --- a/exercises/etl/etl_test.py +++ b/exercises/etl/etl_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 -class TransformTest(unittest.TestCase): +class EtlTest(unittest.TestCase): def test_a_single_letter(self): self.assertEqual(transform({1: ['A']}), {'a': 1}) diff --git a/exercises/flatten-array/flatten_array_test.py b/exercises/flatten-array/flatten_array_test.py index 9033ea9870e..a2189e96014 100644 --- a/exercises/flatten-array/flatten_array_test.py +++ b/exercises/flatten-array/flatten_array_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class FlattenArrayTests(unittest.TestCase): +class FlattenArrayTest(unittest.TestCase): def test_no_nesting(self): self.assertEqual(flatten([0, 1, 2]), [0, 1, 2]) diff --git a/exercises/grade-school/grade_school_test.py b/exercises/grade-school/grade_school_test.py index 6090f24b4ac..bff7ba3ff03 100644 --- a/exercises/grade-school/grade_school_test.py +++ b/exercises/grade-school/grade_school_test.py @@ -5,7 +5,7 @@ from grade_school import School -class SchoolTest(unittest.TestCase): +class GradeSchoolTest(unittest.TestCase): def setUp(self): # assertCountEqual is py3, py2 only knowns assetItemsEqual if not hasattr(self, 'assertCountEqual'): diff --git a/exercises/hello-world/hello_world_test.py b/exercises/hello-world/hello_world_test.py index c1bcd6cffb9..5547432bb98 100644 --- a/exercises/hello-world/hello_world_test.py +++ b/exercises/hello-world/hello_world_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class HelloWorldTests(unittest.TestCase): +class HelloWorldTest(unittest.TestCase): def test_hello(self): self.assertEqual(hello_world.hello(), 'Hello, World!') diff --git a/exercises/house/house_test.py b/exercises/house/house_test.py index 8b58eac4fff..651e4a1f82e 100644 --- a/exercises/house/house_test.py +++ b/exercises/house/house_test.py @@ -7,7 +7,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.1.0 -class VerseTest(unittest.TestCase): +class HouseTest(unittest.TestCase): def test_verse_one(self): expected = ["This is the house that Jack built."] self.assertEqual(recite(1, 1), expected) diff --git a/exercises/isbn-verifier/isbn_verifier_test.py b/exercises/isbn-verifier/isbn_verifier_test.py index 3fd62269e15..1cee1d4de3a 100644 --- a/exercises/isbn-verifier/isbn_verifier_test.py +++ b/exercises/isbn-verifier/isbn_verifier_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.4.0 -class IsbnVerifierTests(unittest.TestCase): +class IsbnVerifierTest(unittest.TestCase): def test_valid_isbn_number(self): self.assertIs(verify('3-598-21508-8'), True) diff --git a/exercises/isogram/isogram_test.py b/exercises/isogram/isogram_test.py index 175ec926156..bc3269df8a6 100644 --- a/exercises/isogram/isogram_test.py +++ b/exercises/isogram/isogram_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class TestIsogram(unittest.TestCase): +class IsogramTest(unittest.TestCase): def test_empty_string(self): self.assertIs(is_isogram(""), True) diff --git a/exercises/kindergarten-garden/kindergarten_garden_test.py b/exercises/kindergarten-garden/kindergarten_garden_test.py index d321f3db005..794d584ac49 100644 --- a/exercises/kindergarten-garden/kindergarten_garden_test.py +++ b/exercises/kindergarten-garden/kindergarten_garden_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class KindergartenGardenTests(unittest.TestCase): +class KindergartenGardenTest(unittest.TestCase): def test_garden_with_single_student(self): self.assertEqual( Garden("RC\nGG").plants("Alice"), diff --git a/exercises/largest-series-product/largest_series_product_test.py b/exercises/largest-series-product/largest_series_product_test.py index 2ab5f5239f2..d19b1942e93 100644 --- a/exercises/largest-series-product/largest_series_product_test.py +++ b/exercises/largest-series-product/largest_series_product_test.py @@ -13,7 +13,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class SeriesTest(unittest.TestCase): +class LargestSeriesProductTest(unittest.TestCase): def test_finds_the_largest_product_if_span_equals_length(self): self.assertEqual(largest_product("29", 2), 18) diff --git a/exercises/leap/leap_test.py b/exercises/leap/leap_test.py index 8b4d49f9328..a899db109d1 100644 --- a/exercises/leap/leap_test.py +++ b/exercises/leap/leap_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0 -class YearTest(unittest.TestCase): +class LeapTest(unittest.TestCase): def test_year_not_divisible_by_4(self): self.assertIs(is_leap_year(2015), False) diff --git a/exercises/linked-list/linked_list_test.py b/exercises/linked-list/linked_list_test.py index 70d380532f0..6d5e2b04674 100644 --- a/exercises/linked-list/linked_list_test.py +++ b/exercises/linked-list/linked_list_test.py @@ -3,7 +3,7 @@ from linked_list import LinkedList -class LinkedListTests(unittest.TestCase): +class LinkedListTest(unittest.TestCase): def setUp(self): self.list = LinkedList() diff --git a/exercises/luhn/luhn_test.py b/exercises/luhn/luhn_test.py index 9ed11199b66..53225189292 100644 --- a/exercises/luhn/luhn_test.py +++ b/exercises/luhn/luhn_test.py @@ -7,7 +7,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class LuhnTests(unittest.TestCase): +class LuhnTest(unittest.TestCase): def test_single_digit_strings_can_not_be_valid(self): self.assertIs(Luhn("1").is_valid(), False) diff --git a/exercises/markdown/markdown_test.py b/exercises/markdown/markdown_test.py index b04a48734c2..c33faeeb8d3 100644 --- a/exercises/markdown/markdown_test.py +++ b/exercises/markdown/markdown_test.py @@ -4,7 +4,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class TestMarkdown(unittest.TestCase): +class MarkdownTest(unittest.TestCase): def test_paragraph(self): self.assertEqual(parse_markdown('This will be a paragraph'), diff --git a/exercises/nth-prime/nth_prime_test.py b/exercises/nth-prime/nth_prime_test.py index 14498b5ede5..c0034eea87f 100644 --- a/exercises/nth-prime/nth_prime_test.py +++ b/exercises/nth-prime/nth_prime_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.1.0 -class NthPrimeTests(unittest.TestCase): +class NthPrimeTest(unittest.TestCase): def test_first_prime(self): self.assertEqual(nth_prime(1), 2) diff --git a/exercises/nucleotide-count/nucleotide_count_test.py b/exercises/nucleotide-count/nucleotide_count_test.py index 8b6dc21dd7c..e4d205d4aa9 100644 --- a/exercises/nucleotide-count/nucleotide_count_test.py +++ b/exercises/nucleotide-count/nucleotide_count_test.py @@ -9,7 +9,7 @@ from nucleotide_count import count, nucleotide_counts -class DNATest(unittest.TestCase): +class NucleotideCountTest(unittest.TestCase): def test_empty_dna_string_has_no_adenosine(self): self.assertEqual(count('', 'A'), 0) diff --git a/exercises/ocr-numbers/ocr_numbers_test.py b/exercises/ocr-numbers/ocr_numbers_test.py index 0f10c6e5e03..9e5d3eb5891 100644 --- a/exercises/ocr-numbers/ocr_numbers_test.py +++ b/exercises/ocr-numbers/ocr_numbers_test.py @@ -13,7 +13,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class OcrTest(unittest.TestCase): +class OcrNumbersTest(unittest.TestCase): def test_recognizes_0(self): self.assertEqual(convert([" _ ", "| |", diff --git a/exercises/palindrome-products/palindrome_products_test.py b/exercises/palindrome-products/palindrome_products_test.py index 7f6616bec75..da8a4ef2f0a 100644 --- a/exercises/palindrome-products/palindrome_products_test.py +++ b/exercises/palindrome-products/palindrome_products_test.py @@ -18,7 +18,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class PalindromesTests(unittest.TestCase): +class PalindromeProductsTest(unittest.TestCase): def test_smallest_palindrome_from_single_digit_factors(self): value, factors = smallest_palindrome(min_factor=1, max_factor=9) self.assertEqual(value, 1) diff --git a/exercises/pangram/pangram_test.py b/exercises/pangram/pangram_test.py index 621e5d321a7..0564b18307f 100644 --- a/exercises/pangram/pangram_test.py +++ b/exercises/pangram/pangram_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0 -class PangramTests(unittest.TestCase): +class PangramTest(unittest.TestCase): def test_sentence_empty(self): self.assertIs(is_pangram(''), False) diff --git a/exercises/phone-number/phone_number_test.py b/exercises/phone-number/phone_number_test.py index be42a093f2f..9c0eee5bbf0 100644 --- a/exercises/phone-number/phone_number_test.py +++ b/exercises/phone-number/phone_number_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0 -class PhoneTest(unittest.TestCase): +class PhoneNumberTest(unittest.TestCase): def test_cleans_number(self): number = Phone("(223) 456-7890").number self.assertEqual(number, "2234567890") diff --git a/exercises/pig-latin/pig_latin_test.py b/exercises/pig-latin/pig_latin_test.py index 9ec7acf33b7..d1a924371cb 100644 --- a/exercises/pig-latin/pig_latin_test.py +++ b/exercises/pig-latin/pig_latin_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class PigLatinTests(unittest.TestCase): +class PigLatinTest(unittest.TestCase): def test_word_beginning_with_a(self): self.assertEqual(translate("apple"), "appleay") diff --git a/exercises/point-mutations/point_mutations_test.py b/exercises/point-mutations/point_mutations_test.py index bacb2bb2a91..1977888bc32 100644 --- a/exercises/point-mutations/point_mutations_test.py +++ b/exercises/point-mutations/point_mutations_test.py @@ -3,7 +3,7 @@ from point_mutations import hamming_distance -class DNATest(unittest.TestCase): +class PointMutationsTest(unittest.TestCase): def test_no_difference_between_empty_strands(self): self.assertEqual(hamming_distance('', ''), 0) diff --git a/exercises/protein-translation/protein_translation_test.py b/exercises/protein-translation/protein_translation_test.py index 728feb44038..9111eb34c0d 100644 --- a/exercises/protein-translation/protein_translation_test.py +++ b/exercises/protein-translation/protein_translation_test.py @@ -5,7 +5,7 @@ # Tests adapted from problem-specifications/canonical-data.json @ v1.1.0 -class ProteinTranslationTests(unittest.TestCase): +class ProteinTranslationTest(unittest.TestCase): def test_AUG_translates_to_methionine(self): self.assertEqual(proteins('AUG'), ['Methionine']) diff --git a/exercises/rail-fence-cipher/rail_fence_cipher_test.py b/exercises/rail-fence-cipher/rail_fence_cipher_test.py index af9b9260ddd..874165accfb 100644 --- a/exercises/rail-fence-cipher/rail_fence_cipher_test.py +++ b/exercises/rail-fence-cipher/rail_fence_cipher_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class RailFenceTests(unittest.TestCase): +class RailFenceCipherTest(unittest.TestCase): def test_encode_with_two_rails(self): self.assertMultiLineEqual( encode('XOXOXOXOXOXOXOXOXO', 2), 'XXXXXXXXXOOOOOOOOO') diff --git a/exercises/rational-numbers/rational_numbers_test.py b/exercises/rational-numbers/rational_numbers_test.py index c0070f8d953..081feb2fec1 100644 --- a/exercises/rational-numbers/rational_numbers_test.py +++ b/exercises/rational-numbers/rational_numbers_test.py @@ -7,7 +7,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 -class RationalTests(unittest.TestCase): +class RationalNumbersTest(unittest.TestCase): # Test addition def test_add_two_positive(self): diff --git a/exercises/react/react_test.py b/exercises/react/react_test.py index 3e488ea16f3..7c1870cfda9 100644 --- a/exercises/react/react_test.py +++ b/exercises/react/react_test.py @@ -6,7 +6,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.0 -class ReactTests(unittest.TestCase): +class ReactTest(unittest.TestCase): def test_input_cells_have_a_value(self): input_ = InputCell(10) diff --git a/exercises/rectangles/rectangles_test.py b/exercises/rectangles/rectangles_test.py index 1ba634ca8ae..7d9e3413022 100644 --- a/exercises/rectangles/rectangles_test.py +++ b/exercises/rectangles/rectangles_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class WordTest(unittest.TestCase): +class RectanglesTest(unittest.TestCase): def test_no_rows(self): self.assertEqual(count([]), 0) diff --git a/exercises/reverse-string/reverse_string_test.py b/exercises/reverse-string/reverse_string_test.py index 5dec7aa882a..3f9857b2e78 100644 --- a/exercises/reverse-string/reverse_string_test.py +++ b/exercises/reverse-string/reverse_string_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class ReverseStringTests(unittest.TestCase): +class ReverseStringTest(unittest.TestCase): def test_empty_string(self): self.assertEqual(reverse(''), '') diff --git a/exercises/rna-transcription/rna_transcription_test.py b/exercises/rna-transcription/rna_transcription_test.py index a021ea7af54..3a581966172 100644 --- a/exercises/rna-transcription/rna_transcription_test.py +++ b/exercises/rna-transcription/rna_transcription_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class RNATranscriptionTests(unittest.TestCase): +class RnaTranscriptionTest(unittest.TestCase): def test_transcribes_cytosine_to_guanine(self): self.assertEqual(to_rna('C'), 'G') diff --git a/exercises/robot-name/robot_name_test.py b/exercises/robot-name/robot_name_test.py index 9af46eaafe5..f023b050969 100644 --- a/exercises/robot-name/robot_name_test.py +++ b/exercises/robot-name/robot_name_test.py @@ -4,7 +4,7 @@ from robot_name import Robot -class RobotTest(unittest.TestCase): +class RobotNameTest(unittest.TestCase): # assertRegex() alias to adress DeprecationWarning # assertRegexpMatches got renamed in version 3.2 if not hasattr(unittest.TestCase, "assertRegex"): diff --git a/exercises/robot-simulator/robot_simulator_test.py b/exercises/robot-simulator/robot_simulator_test.py index 9ce22e57fe2..0b589077878 100644 --- a/exercises/robot-simulator/robot_simulator_test.py +++ b/exercises/robot-simulator/robot_simulator_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v2.2.0 -class RobotTests(unittest.TestCase): +class RobotSimulatorTest(unittest.TestCase): def test_init(self): robot = Robot() self.assertEqual(robot.coordinates, (0, 0)) diff --git a/exercises/roman-numerals/roman_numerals_test.py b/exercises/roman-numerals/roman_numerals_test.py index 5fc9c356769..7d531a91282 100644 --- a/exercises/roman-numerals/roman_numerals_test.py +++ b/exercises/roman-numerals/roman_numerals_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class RomanTest(unittest.TestCase): +class RomanNumeralsTest(unittest.TestCase): numerals = { 1: 'I', 2: 'II', diff --git a/exercises/rotational-cipher/rotational_cipher_test.py b/exercises/rotational-cipher/rotational_cipher_test.py index d20b6430b7e..925c528cbb2 100644 --- a/exercises/rotational-cipher/rotational_cipher_test.py +++ b/exercises/rotational-cipher/rotational_cipher_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class RotationalCipher(unittest.TestCase): +class RotationalCipherTest(unittest.TestCase): def test_rotate_a_by_0(self): self.assertEqual(rotational_cipher.rotate('a', 0), 'a') diff --git a/exercises/run-length-encoding/run_length_encoding_test.py b/exercises/run-length-encoding/run_length_encoding_test.py index 5b061450895..1122e5b64cb 100644 --- a/exercises/run-length-encoding/run_length_encoding_test.py +++ b/exercises/run-length-encoding/run_length_encoding_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class RunLengthEncodingTests(unittest.TestCase): +class RunLengthEncodingTest(unittest.TestCase): def test_encode_empty_string(self): self.assertMultiLineEqual(encode(''), '') diff --git a/exercises/saddle-points/saddle_points_test.py b/exercises/saddle-points/saddle_points_test.py index e36e0da88ee..c614f21469f 100644 --- a/exercises/saddle-points/saddle_points_test.py +++ b/exercises/saddle-points/saddle_points_test.py @@ -12,7 +12,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class SaddlePointTest(unittest.TestCase): +class SaddlePointsTest(unittest.TestCase): def test_identify_single_saddle_point(self): matrix = [[9, 8, 7], [5, 3, 2], [6, 6, 7]] self.assertEqual(saddle_points(matrix), set([(1, 0)])) diff --git a/exercises/scrabble-score/scrabble_score_test.py b/exercises/scrabble-score/scrabble_score_test.py index ff648047488..8300bee8521 100644 --- a/exercises/scrabble-score/scrabble_score_test.py +++ b/exercises/scrabble-score/scrabble_score_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class WordTest(unittest.TestCase): +class ScrabbleScoreTest(unittest.TestCase): def test_lowercase_letter(self): self.assertEqual(score("a"), 1) diff --git a/exercises/secret-handshake/secret_handshake_test.py b/exercises/secret-handshake/secret_handshake_test.py index 3aec426f360..31a3b9ece4b 100644 --- a/exercises/secret-handshake/secret_handshake_test.py +++ b/exercises/secret-handshake/secret_handshake_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class HandshakeTest(unittest.TestCase): +class SecretHandshakeTest(unittest.TestCase): def test_wink_for_1(self): self.assertEqual(handshake(1), ['wink']) diff --git a/exercises/simple-cipher/simple_cipher_test.py b/exercises/simple-cipher/simple_cipher_test.py index a9ac321522b..15e7c656683 100644 --- a/exercises/simple-cipher/simple_cipher_test.py +++ b/exercises/simple-cipher/simple_cipher_test.py @@ -3,7 +3,7 @@ from simple_cipher import Caesar, Cipher -class CipherTest(unittest.TestCase): +class SimpleCipherTest(unittest.TestCase): def test_caesar_encode1(self): self.assertEqual(Caesar().encode('itisawesomeprogramminginpython'), 'lwlvdzhvrphsurjudpplqjlqsbwkrq') diff --git a/exercises/simple-linked-list/simple_linked_list_test.py b/exercises/simple-linked-list/simple_linked_list_test.py index c76917c3810..5d9c3e1f824 100644 --- a/exercises/simple-linked-list/simple_linked_list_test.py +++ b/exercises/simple-linked-list/simple_linked_list_test.py @@ -5,7 +5,7 @@ # No canonical data available for this exercise -class LinkedListTest(unittest.TestCase): +class SimpleLinkedListTest(unittest.TestCase): def test_empty_list_has_len_zero(self): sut = LinkedList() self.assertEqual(len(sut), 0) diff --git a/exercises/tournament/tournament_test.py b/exercises/tournament/tournament_test.py index a767a9fb604..fa3791db4bd 100644 --- a/exercises/tournament/tournament_test.py +++ b/exercises/tournament/tournament_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0 -class TestTournament(unittest.TestCase): +class TournamentTest(unittest.TestCase): def test_just_the_header_if_no_input(self): self.assertEqual( tally(''), diff --git a/exercises/transpose/transpose_test.py b/exercises/transpose/transpose_test.py index 00d4c93e416..908afc7f9c3 100644 --- a/exercises/transpose/transpose_test.py +++ b/exercises/transpose/transpose_test.py @@ -4,7 +4,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class TransposeTests(unittest.TestCase): +class TransposeTest(unittest.TestCase): def test_empty_string(self): input_line = "" expected = "" diff --git a/exercises/tree-building/tree_building_test.py b/exercises/tree-building/tree_building_test.py index ae01c0e5c36..1bace394be7 100644 --- a/exercises/tree-building/tree_building_test.py +++ b/exercises/tree-building/tree_building_test.py @@ -3,7 +3,7 @@ from tree_building import Record, BuildTree -class TestBuildingTest(unittest.TestCase): +class TreeBuildingTest(unittest.TestCase): """ Record(record_id, parent_id): records given to be processed Node(node_id): Node in tree diff --git a/exercises/twelve-days/twelve_days_test.py b/exercises/twelve-days/twelve_days_test.py index 6d078491bef..90e7d2d03e5 100644 --- a/exercises/twelve-days/twelve_days_test.py +++ b/exercises/twelve-days/twelve_days_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class VerseTests(unittest.TestCase): +class TwelveDaysTest(unittest.TestCase): def test_verse1(self): expected = ["On the first day of Christmas my true love gave to me, " "a Partridge in a Pear Tree."] @@ -133,8 +133,6 @@ def test_verse12(self): "and a Partridge in a Pear Tree."] self.assertEqual(recite(12, 12), expected) - -class LyricsTests(unittest.TestCase): def test_first_three_verses_of_the_song(self): expected = [recite(n, n)[0] for n in range(1, 4)] self.assertEqual(recite(1, 3), expected) diff --git a/exercises/two-fer/two_fer_test.py b/exercises/two-fer/two_fer_test.py index d08272ecbb7..7bec0ef5636 100644 --- a/exercises/two-fer/two_fer_test.py +++ b/exercises/two-fer/two_fer_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class Two_Fer_test(unittest.TestCase): +class TwoFerTest(unittest.TestCase): def test_no_name_given(self): self.assertEqual(two_fer(), 'One for you, one for me.') diff --git a/exercises/variable-length-quantity/variable_length_quantity_test.py b/exercises/variable-length-quantity/variable_length_quantity_test.py index 3849cd8a342..3e639d5ec8b 100644 --- a/exercises/variable-length-quantity/variable_length_quantity_test.py +++ b/exercises/variable-length-quantity/variable_length_quantity_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class TestVLQ(unittest.TestCase): +class VariableLengthQuantityTest(unittest.TestCase): def test_zero(self): self.assertEqual(encode([0x0]), [0x0]) diff --git a/exercises/word-count/word_count_test.py b/exercises/word-count/word_count_test.py index c3f6c83a267..4549ed091fc 100644 --- a/exercises/word-count/word_count_test.py +++ b/exercises/word-count/word_count_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class WordCountTests(unittest.TestCase): +class WordCountTest(unittest.TestCase): def test_count_one_word(self): self.assertEqual( diff --git a/exercises/word-search/word_search_test.py b/exercises/word-search/word_search_test.py index c2048d635ec..1f1ff1a39c7 100644 --- a/exercises/word-search/word_search_test.py +++ b/exercises/word-search/word_search_test.py @@ -5,7 +5,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 -class WordSearchTests(unittest.TestCase): +class WordSearchTest(unittest.TestCase): def test_initial_game_grid(self): puzzle = ['jefblpepre'] diff --git a/exercises/yacht/yacht_test.py b/exercises/yacht/yacht_test.py index 6cf62b500cf..628b9ab76dc 100644 --- a/exercises/yacht/yacht_test.py +++ b/exercises/yacht/yacht_test.py @@ -6,7 +6,7 @@ # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 -class YachtTests(unittest.TestCase): +class YachtTest(unittest.TestCase): def test_yacht(self): self.assertEqual(score([5, 5, 5, 5, 5], yacht.YACHT), 50)