diff --git a/accumulate/accumulate_test.py b/exercises/accumulate/accumulate_test.py similarity index 100% rename from accumulate/accumulate_test.py rename to exercises/accumulate/accumulate_test.py diff --git a/accumulate/example.py b/exercises/accumulate/example.py similarity index 100% rename from accumulate/example.py rename to exercises/accumulate/example.py diff --git a/allergies/allergies_test.py b/exercises/allergies/allergies_test.py similarity index 100% rename from allergies/allergies_test.py rename to exercises/allergies/allergies_test.py diff --git a/allergies/example.py b/exercises/allergies/example.py similarity index 100% rename from allergies/example.py rename to exercises/allergies/example.py diff --git a/anagram/anagram_test.py b/exercises/anagram/anagram_test.py similarity index 100% rename from anagram/anagram_test.py rename to exercises/anagram/anagram_test.py diff --git a/anagram/example.py b/exercises/anagram/example.py similarity index 100% rename from anagram/example.py rename to exercises/anagram/example.py diff --git a/atbash-cipher/atbash_cipher_test.py b/exercises/atbash-cipher/atbash_cipher_test.py similarity index 100% rename from atbash-cipher/atbash_cipher_test.py rename to exercises/atbash-cipher/atbash_cipher_test.py diff --git a/atbash-cipher/example.py b/exercises/atbash-cipher/example.py similarity index 100% rename from atbash-cipher/example.py rename to exercises/atbash-cipher/example.py diff --git a/beer-song/beer_song_test.py b/exercises/beer-song/beer_song_test.py similarity index 100% rename from beer-song/beer_song_test.py rename to exercises/beer-song/beer_song_test.py diff --git a/beer-song/example.py b/exercises/beer-song/example.py similarity index 100% rename from beer-song/example.py rename to exercises/beer-song/example.py diff --git a/binary/binary_test.py b/exercises/binary/binary_test.py similarity index 100% rename from binary/binary_test.py rename to exercises/binary/binary_test.py diff --git a/binary/example.py b/exercises/binary/example.py similarity index 100% rename from binary/example.py rename to exercises/binary/example.py diff --git a/bob/bob.py b/exercises/bob/bob.py similarity index 100% rename from bob/bob.py rename to exercises/bob/bob.py diff --git a/bob/bob_test.py b/exercises/bob/bob_test.py similarity index 100% rename from bob/bob_test.py rename to exercises/bob/bob_test.py diff --git a/bob/example.py b/exercises/bob/example.py similarity index 100% rename from bob/example.py rename to exercises/bob/example.py diff --git a/bracket-push/bracket_push_test.py b/exercises/bracket-push/bracket_push_test.py similarity index 100% rename from bracket-push/bracket_push_test.py rename to exercises/bracket-push/bracket_push_test.py diff --git a/bracket-push/example.py b/exercises/bracket-push/example.py similarity index 100% rename from bracket-push/example.py rename to exercises/bracket-push/example.py diff --git a/crypto-square/crypto_square_test.py b/exercises/crypto-square/crypto_square_test.py similarity index 100% rename from crypto-square/crypto_square_test.py rename to exercises/crypto-square/crypto_square_test.py diff --git a/crypto-square/example.py b/exercises/crypto-square/example.py similarity index 100% rename from crypto-square/example.py rename to exercises/crypto-square/example.py diff --git a/difference-of-squares/difference_of_squares_test.py b/exercises/difference-of-squares/difference_of_squares_test.py similarity index 100% rename from difference-of-squares/difference_of_squares_test.py rename to exercises/difference-of-squares/difference_of_squares_test.py diff --git a/difference-of-squares/example.py b/exercises/difference-of-squares/example.py similarity index 100% rename from difference-of-squares/example.py rename to exercises/difference-of-squares/example.py diff --git a/etl/etl_test.py b/exercises/etl/etl_test.py similarity index 100% rename from etl/etl_test.py rename to exercises/etl/etl_test.py diff --git a/etl/example.py b/exercises/etl/example.py similarity index 100% rename from etl/example.py rename to exercises/etl/example.py diff --git a/gigasecond/example.py b/exercises/gigasecond/example.py similarity index 100% rename from gigasecond/example.py rename to exercises/gigasecond/example.py diff --git a/gigasecond/gigasecond_test.py b/exercises/gigasecond/gigasecond_test.py similarity index 100% rename from gigasecond/gigasecond_test.py rename to exercises/gigasecond/gigasecond_test.py diff --git a/grade-school/example.py b/exercises/grade-school/example.py similarity index 100% rename from grade-school/example.py rename to exercises/grade-school/example.py diff --git a/grade-school/grade_school_test.py b/exercises/grade-school/grade_school_test.py similarity index 100% rename from grade-school/grade_school_test.py rename to exercises/grade-school/grade_school_test.py diff --git a/grains/example.py b/exercises/grains/example.py similarity index 100% rename from grains/example.py rename to exercises/grains/example.py diff --git a/grains/grains_test.py b/exercises/grains/grains_test.py similarity index 100% rename from grains/grains_test.py rename to exercises/grains/grains_test.py diff --git a/hamming/example.py b/exercises/hamming/example.py similarity index 100% rename from hamming/example.py rename to exercises/hamming/example.py diff --git a/hamming/hamming_test.py b/exercises/hamming/hamming_test.py similarity index 100% rename from hamming/hamming_test.py rename to exercises/hamming/hamming_test.py diff --git a/hello-world/example.py b/exercises/hello-world/example.py similarity index 100% rename from hello-world/example.py rename to exercises/hello-world/example.py diff --git a/hello-world/hello_world.py b/exercises/hello-world/hello_world.py similarity index 100% rename from hello-world/hello_world.py rename to exercises/hello-world/hello_world.py diff --git a/hello-world/hello_world_test.py b/exercises/hello-world/hello_world_test.py similarity index 100% rename from hello-world/hello_world_test.py rename to exercises/hello-world/hello_world_test.py diff --git a/hexadecimal/example.py b/exercises/hexadecimal/example.py similarity index 100% rename from hexadecimal/example.py rename to exercises/hexadecimal/example.py diff --git a/hexadecimal/hexadecimal_test.py b/exercises/hexadecimal/hexadecimal_test.py similarity index 100% rename from hexadecimal/hexadecimal_test.py rename to exercises/hexadecimal/hexadecimal_test.py diff --git a/house/example.py b/exercises/house/example.py similarity index 100% rename from house/example.py rename to exercises/house/example.py diff --git a/house/house_test.py b/exercises/house/house_test.py similarity index 100% rename from house/house_test.py rename to exercises/house/house_test.py diff --git a/kindergarten-garden/example.py b/exercises/kindergarten-garden/example.py similarity index 100% rename from kindergarten-garden/example.py rename to exercises/kindergarten-garden/example.py diff --git a/kindergarten-garden/kindergarten_garden_test.py b/exercises/kindergarten-garden/kindergarten_garden_test.py similarity index 100% rename from kindergarten-garden/kindergarten_garden_test.py rename to exercises/kindergarten-garden/kindergarten_garden_test.py diff --git a/largest-series-product/example.py b/exercises/largest-series-product/example.py similarity index 100% rename from largest-series-product/example.py rename to exercises/largest-series-product/example.py diff --git a/largest-series-product/largest_series_product_test.py b/exercises/largest-series-product/largest_series_product_test.py similarity index 100% rename from largest-series-product/largest_series_product_test.py rename to exercises/largest-series-product/largest_series_product_test.py diff --git a/leap/example.py b/exercises/leap/example.py similarity index 100% rename from leap/example.py rename to exercises/leap/example.py diff --git a/leap/leap_test.py b/exercises/leap/leap_test.py similarity index 100% rename from leap/leap_test.py rename to exercises/leap/leap_test.py diff --git a/luhn/example.py b/exercises/luhn/example.py similarity index 100% rename from luhn/example.py rename to exercises/luhn/example.py diff --git a/luhn/luhn_test.py b/exercises/luhn/luhn_test.py similarity index 100% rename from luhn/luhn_test.py rename to exercises/luhn/luhn_test.py diff --git a/matrix/example.py b/exercises/matrix/example.py similarity index 100% rename from matrix/example.py rename to exercises/matrix/example.py diff --git a/matrix/matrix_test.py b/exercises/matrix/matrix_test.py similarity index 100% rename from matrix/matrix_test.py rename to exercises/matrix/matrix_test.py diff --git a/meetup/example.py b/exercises/meetup/example.py similarity index 100% rename from meetup/example.py rename to exercises/meetup/example.py diff --git a/meetup/meetup_test.py b/exercises/meetup/meetup_test.py similarity index 100% rename from meetup/meetup_test.py rename to exercises/meetup/meetup_test.py diff --git a/minesweeper/example.py b/exercises/minesweeper/example.py similarity index 100% rename from minesweeper/example.py rename to exercises/minesweeper/example.py diff --git a/minesweeper/minesweeper_test.py b/exercises/minesweeper/minesweeper_test.py similarity index 100% rename from minesweeper/minesweeper_test.py rename to exercises/minesweeper/minesweeper_test.py diff --git a/nth-prime/example.py b/exercises/nth-prime/example.py similarity index 100% rename from nth-prime/example.py rename to exercises/nth-prime/example.py diff --git a/nth-prime/nth_prime_test.py b/exercises/nth-prime/nth_prime_test.py similarity index 100% rename from nth-prime/nth_prime_test.py rename to exercises/nth-prime/nth_prime_test.py diff --git a/nucleotide-count/example.py b/exercises/nucleotide-count/example.py similarity index 100% rename from nucleotide-count/example.py rename to exercises/nucleotide-count/example.py diff --git a/nucleotide-count/nucleotide_count_test.py b/exercises/nucleotide-count/nucleotide_count_test.py similarity index 100% rename from nucleotide-count/nucleotide_count_test.py rename to exercises/nucleotide-count/nucleotide_count_test.py diff --git a/ocr-numbers/example.py b/exercises/ocr-numbers/example.py similarity index 100% rename from ocr-numbers/example.py rename to exercises/ocr-numbers/example.py diff --git a/ocr-numbers/ocr_test.py b/exercises/ocr-numbers/ocr_test.py similarity index 100% rename from ocr-numbers/ocr_test.py rename to exercises/ocr-numbers/ocr_test.py diff --git a/octal/example.py b/exercises/octal/example.py similarity index 100% rename from octal/example.py rename to exercises/octal/example.py diff --git a/octal/octal_test.py b/exercises/octal/octal_test.py similarity index 100% rename from octal/octal_test.py rename to exercises/octal/octal_test.py diff --git a/palindrome-products/example.py b/exercises/palindrome-products/example.py similarity index 100% rename from palindrome-products/example.py rename to exercises/palindrome-products/example.py diff --git a/palindrome-products/palindrome_products_test.py b/exercises/palindrome-products/palindrome_products_test.py similarity index 100% rename from palindrome-products/palindrome_products_test.py rename to exercises/palindrome-products/palindrome_products_test.py diff --git a/pangram/example.py b/exercises/pangram/example.py similarity index 100% rename from pangram/example.py rename to exercises/pangram/example.py diff --git a/pangram/pangram_test.py b/exercises/pangram/pangram_test.py similarity index 100% rename from pangram/pangram_test.py rename to exercises/pangram/pangram_test.py diff --git a/pascals-triangle/example.py b/exercises/pascals-triangle/example.py similarity index 100% rename from pascals-triangle/example.py rename to exercises/pascals-triangle/example.py diff --git a/pascals-triangle/pascals_triangle_test.py b/exercises/pascals-triangle/pascals_triangle_test.py similarity index 100% rename from pascals-triangle/pascals_triangle_test.py rename to exercises/pascals-triangle/pascals_triangle_test.py diff --git a/phone-number/example.py b/exercises/phone-number/example.py similarity index 100% rename from phone-number/example.py rename to exercises/phone-number/example.py diff --git a/phone-number/phone_number_test.py b/exercises/phone-number/phone_number_test.py similarity index 100% rename from phone-number/phone_number_test.py rename to exercises/phone-number/phone_number_test.py diff --git a/pig-latin/example.py b/exercises/pig-latin/example.py similarity index 100% rename from pig-latin/example.py rename to exercises/pig-latin/example.py diff --git a/pig-latin/pig_latin_test.py b/exercises/pig-latin/pig_latin_test.py similarity index 100% rename from pig-latin/pig_latin_test.py rename to exercises/pig-latin/pig_latin_test.py diff --git a/point-mutations/example.py b/exercises/point-mutations/example.py similarity index 100% rename from point-mutations/example.py rename to exercises/point-mutations/example.py diff --git a/point-mutations/point_mutations_test.py b/exercises/point-mutations/point_mutations_test.py similarity index 100% rename from point-mutations/point_mutations_test.py rename to exercises/point-mutations/point_mutations_test.py diff --git a/poker/example.py b/exercises/poker/example.py similarity index 100% rename from poker/example.py rename to exercises/poker/example.py diff --git a/poker/poker_test.py b/exercises/poker/poker_test.py similarity index 100% rename from poker/poker_test.py rename to exercises/poker/poker_test.py diff --git a/prime-factors/example.py b/exercises/prime-factors/example.py similarity index 100% rename from prime-factors/example.py rename to exercises/prime-factors/example.py diff --git a/prime-factors/prime_factors_test.py b/exercises/prime-factors/prime_factors_test.py similarity index 100% rename from prime-factors/prime_factors_test.py rename to exercises/prime-factors/prime_factors_test.py diff --git a/proverb/example.py b/exercises/proverb/example.py similarity index 100% rename from proverb/example.py rename to exercises/proverb/example.py diff --git a/proverb/proverb_test.py b/exercises/proverb/proverb_test.py similarity index 100% rename from proverb/proverb_test.py rename to exercises/proverb/proverb_test.py diff --git a/pythagorean-triplet/example.py b/exercises/pythagorean-triplet/example.py similarity index 100% rename from pythagorean-triplet/example.py rename to exercises/pythagorean-triplet/example.py diff --git a/pythagorean-triplet/pythagorean_triplet_test.py b/exercises/pythagorean-triplet/pythagorean_triplet_test.py similarity index 100% rename from pythagorean-triplet/pythagorean_triplet_test.py rename to exercises/pythagorean-triplet/pythagorean_triplet_test.py diff --git a/queen-attack/example.py b/exercises/queen-attack/example.py similarity index 100% rename from queen-attack/example.py rename to exercises/queen-attack/example.py diff --git a/queen-attack/queen_attack_test.py b/exercises/queen-attack/queen_attack_test.py similarity index 100% rename from queen-attack/queen_attack_test.py rename to exercises/queen-attack/queen_attack_test.py diff --git a/raindrops/example.py b/exercises/raindrops/example.py similarity index 100% rename from raindrops/example.py rename to exercises/raindrops/example.py diff --git a/raindrops/raindrops_test.py b/exercises/raindrops/raindrops_test.py similarity index 100% rename from raindrops/raindrops_test.py rename to exercises/raindrops/raindrops_test.py diff --git a/rectangles/example.py b/exercises/rectangles/example.py similarity index 100% rename from rectangles/example.py rename to exercises/rectangles/example.py diff --git a/rectangles/rectangles_count_test.py b/exercises/rectangles/rectangles_count_test.py similarity index 100% rename from rectangles/rectangles_count_test.py rename to exercises/rectangles/rectangles_count_test.py diff --git a/rna-transcription/example.py b/exercises/rna-transcription/example.py similarity index 100% rename from rna-transcription/example.py rename to exercises/rna-transcription/example.py diff --git a/rna-transcription/rna_transcription_test.py b/exercises/rna-transcription/rna_transcription_test.py similarity index 100% rename from rna-transcription/rna_transcription_test.py rename to exercises/rna-transcription/rna_transcription_test.py diff --git a/robot-name/example.py b/exercises/robot-name/example.py similarity index 100% rename from robot-name/example.py rename to exercises/robot-name/example.py diff --git a/robot-name/robot_name_test.py b/exercises/robot-name/robot_name_test.py similarity index 100% rename from robot-name/robot_name_test.py rename to exercises/robot-name/robot_name_test.py diff --git a/robot-simulator/example.py b/exercises/robot-simulator/example.py similarity index 100% rename from robot-simulator/example.py rename to exercises/robot-simulator/example.py diff --git a/robot-simulator/robot_simulator_test.py b/exercises/robot-simulator/robot_simulator_test.py similarity index 100% rename from robot-simulator/robot_simulator_test.py rename to exercises/robot-simulator/robot_simulator_test.py diff --git a/roman-numerals/example.py b/exercises/roman-numerals/example.py similarity index 100% rename from roman-numerals/example.py rename to exercises/roman-numerals/example.py diff --git a/roman-numerals/roman_numerals_test.py b/exercises/roman-numerals/roman_numerals_test.py similarity index 100% rename from roman-numerals/roman_numerals_test.py rename to exercises/roman-numerals/roman_numerals_test.py diff --git a/run-length-encoding/example.py b/exercises/run-length-encoding/example.py similarity index 100% rename from run-length-encoding/example.py rename to exercises/run-length-encoding/example.py diff --git a/run-length-encoding/run_length_test.py b/exercises/run-length-encoding/run_length_test.py similarity index 100% rename from run-length-encoding/run_length_test.py rename to exercises/run-length-encoding/run_length_test.py diff --git a/saddle-points/example.py b/exercises/saddle-points/example.py similarity index 100% rename from saddle-points/example.py rename to exercises/saddle-points/example.py diff --git a/saddle-points/saddle_points_test.py b/exercises/saddle-points/saddle_points_test.py similarity index 100% rename from saddle-points/saddle_points_test.py rename to exercises/saddle-points/saddle_points_test.py diff --git a/say/example.py b/exercises/say/example.py similarity index 100% rename from say/example.py rename to exercises/say/example.py diff --git a/say/say_test.py b/exercises/say/say_test.py similarity index 100% rename from say/say_test.py rename to exercises/say/say_test.py diff --git a/scrabble-score/example.py b/exercises/scrabble-score/example.py similarity index 100% rename from scrabble-score/example.py rename to exercises/scrabble-score/example.py diff --git a/scrabble-score/scrabble_score_test.py b/exercises/scrabble-score/scrabble_score_test.py similarity index 100% rename from scrabble-score/scrabble_score_test.py rename to exercises/scrabble-score/scrabble_score_test.py diff --git a/secret-handshake/example.py b/exercises/secret-handshake/example.py similarity index 100% rename from secret-handshake/example.py rename to exercises/secret-handshake/example.py diff --git a/secret-handshake/handshake_test.py b/exercises/secret-handshake/handshake_test.py similarity index 100% rename from secret-handshake/handshake_test.py rename to exercises/secret-handshake/handshake_test.py diff --git a/series/example.py b/exercises/series/example.py similarity index 100% rename from series/example.py rename to exercises/series/example.py diff --git a/series/series_test.py b/exercises/series/series_test.py similarity index 100% rename from series/series_test.py rename to exercises/series/series_test.py diff --git a/sieve/example.py b/exercises/sieve/example.py similarity index 100% rename from sieve/example.py rename to exercises/sieve/example.py diff --git a/sieve/sieve_test.py b/exercises/sieve/sieve_test.py similarity index 100% rename from sieve/sieve_test.py rename to exercises/sieve/sieve_test.py diff --git a/simple-cipher/example.py b/exercises/simple-cipher/example.py similarity index 100% rename from simple-cipher/example.py rename to exercises/simple-cipher/example.py diff --git a/simple-cipher/simple_cipher_test.py b/exercises/simple-cipher/simple_cipher_test.py similarity index 100% rename from simple-cipher/simple_cipher_test.py rename to exercises/simple-cipher/simple_cipher_test.py diff --git a/space-age/example.py b/exercises/space-age/example.py similarity index 100% rename from space-age/example.py rename to exercises/space-age/example.py diff --git a/space-age/space_age_test.py b/exercises/space-age/space_age_test.py similarity index 100% rename from space-age/space_age_test.py rename to exercises/space-age/space_age_test.py diff --git a/strain/example.py b/exercises/strain/example.py similarity index 100% rename from strain/example.py rename to exercises/strain/example.py diff --git a/strain/strain_test.py b/exercises/strain/strain_test.py similarity index 100% rename from strain/strain_test.py rename to exercises/strain/strain_test.py diff --git a/sublist/example.py b/exercises/sublist/example.py similarity index 100% rename from sublist/example.py rename to exercises/sublist/example.py diff --git a/sublist/sublist_test.py b/exercises/sublist/sublist_test.py similarity index 100% rename from sublist/sublist_test.py rename to exercises/sublist/sublist_test.py diff --git a/sum-of-multiples/example.py b/exercises/sum-of-multiples/example.py similarity index 100% rename from sum-of-multiples/example.py rename to exercises/sum-of-multiples/example.py diff --git a/sum-of-multiples/sum_of_multiples_test.py b/exercises/sum-of-multiples/sum_of_multiples_test.py similarity index 100% rename from sum-of-multiples/sum_of_multiples_test.py rename to exercises/sum-of-multiples/sum_of_multiples_test.py diff --git a/triangle/example.py b/exercises/triangle/example.py similarity index 100% rename from triangle/example.py rename to exercises/triangle/example.py diff --git a/triangle/triangle_test.py b/exercises/triangle/triangle_test.py similarity index 100% rename from triangle/triangle_test.py rename to exercises/triangle/triangle_test.py diff --git a/trinary/example.py b/exercises/trinary/example.py similarity index 100% rename from trinary/example.py rename to exercises/trinary/example.py diff --git a/trinary/trinary_test.py b/exercises/trinary/trinary_test.py similarity index 100% rename from trinary/trinary_test.py rename to exercises/trinary/trinary_test.py diff --git a/twelve-days/example.py b/exercises/twelve-days/example.py similarity index 100% rename from twelve-days/example.py rename to exercises/twelve-days/example.py diff --git a/twelve-days/twelve_days_test.py b/exercises/twelve-days/twelve_days_test.py similarity index 100% rename from twelve-days/twelve_days_test.py rename to exercises/twelve-days/twelve_days_test.py diff --git a/word-count/example.py b/exercises/word-count/example.py similarity index 100% rename from word-count/example.py rename to exercises/word-count/example.py diff --git a/word-count/word_count_test.py b/exercises/word-count/word_count_test.py similarity index 100% rename from word-count/word_count_test.py rename to exercises/word-count/word_count_test.py diff --git a/wordy/example.py b/exercises/wordy/example.py similarity index 100% rename from wordy/example.py rename to exercises/wordy/example.py diff --git a/wordy/wordy_test.py b/exercises/wordy/wordy_test.py similarity index 100% rename from wordy/wordy_test.py rename to exercises/wordy/wordy_test.py diff --git a/zebra-puzzle/example.py b/exercises/zebra-puzzle/example.py similarity index 100% rename from zebra-puzzle/example.py rename to exercises/zebra-puzzle/example.py diff --git a/zebra-puzzle/zebra_puzzle_test.py b/exercises/zebra-puzzle/zebra_puzzle_test.py similarity index 100% rename from zebra-puzzle/zebra_puzzle_test.py rename to exercises/zebra-puzzle/zebra_puzzle_test.py diff --git a/test/check-exercises.py b/test/check-exercises.py index 42dcd652a5..49beb13b9f 100755 --- a/test/check-exercises.py +++ b/test/check-exercises.py @@ -56,12 +56,12 @@ def assignment_name(test_file): def main(): if len(sys.argv) == 2: # test a specific exercise exercise_path = sys.argv[1].strip('/') - test_file = glob.glob('./{}/*_test.py'.format(exercise_path))[0] + test_file = glob.glob('./exercises/{}/*_test.py'.format(exercise_path))[0] check_assignment(assignment_name(test_file), test_file, modname_heuristic(test_file)) else: failures = [] - for test_file in glob.glob('./*/*_test.py'): + for test_file in glob.glob('./exercises/*/*_test.py'): name = assignment_name(test_file) print('# ' + name) if check_assignment(name, test_file, modname_heuristic(test_file)):