Skip to content

Skip all but the first test. #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ python:
- "3.3"
- "3.4"
script:
- ./test/check-exercises.py
- ./test/check-exercises.bash
- ./bin/fetch-configlet
- ./bin/configlet .
5 changes: 5 additions & 0 deletions accumulate/accumulate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,31 @@ class AccumulateTest(unittest.TestCase):
def test_empty_sequence(self):
self.assertEqual([], accumulate([], lambda x: x/2))

@unittest.skip("")
def test_pow(self):
self.assertEqual([1, 4, 9, 16, 25], accumulate([1, 2, 3, 4, 5],
lambda x: x*x))

@unittest.skip("")
def test_divmod(self):
inp = [10, 17, 23]
out = [(1, 3), (2, 3), (3, 2)]
self.assertEqual(out, accumulate(inp, lambda x: divmod(x, 7)))

@unittest.skip("")
def test_composition(self):
inp = [10, 17, 23]
fn1 = lambda x: divmod(x, 7)
fn2 = lambda x: 7*x[0]+x[1]
self.assertEqual(inp, accumulate(accumulate(inp, fn1), fn2))

@unittest.skip("")
def test_capitalize(self):
inp = ['hello', 'world']
out = ['HELLO', 'WORLD']
self.assertEqual(out, accumulate(inp, str.upper))

@unittest.skip("")
def test_recursive(self):
inp = list('abc')
out = [['a1', 'a2', 'a3'], ['b1', 'b2', 'b3'], ['c1', 'c2', 'c3']]
Expand Down
6 changes: 6 additions & 0 deletions allergies/allergies_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,33 @@ def test_no_allergies_means_not_allergic(self):
self.assertFalse(allergies.is_allergic_to('cats'))
self.assertFalse(allergies.is_allergic_to('strawberries'))

@unittest.skip("")
def test_is_allergic_to_eggs(self):
self.assertTrue(Allergies(1).is_allergic_to('eggs'))

@unittest.skip("")
def test_has_the_right_allergies(self):
allergies = Allergies(5)
self.assertTrue(allergies.is_allergic_to('eggs'))
self.assertTrue(allergies.is_allergic_to('shellfish'))
self.assertFalse(allergies.is_allergic_to('strawberries'))

@unittest.skip("")
def test_no_allergies_at_all(self):
self.assertEqual([], Allergies(0).list)

@unittest.skip("")
def test_allergic_to_just_peanuts(self):
self.assertEqual(['peanuts'], Allergies(2).list)

@unittest.skip("")
def test_allergic_to_everything(self):
self.assertEqual(
('eggs peanuts shellfish strawberries tomatoes '
'chocolate pollen cats').split(),
Allergies(255).list)

@unittest.skip("")
def test_ignore_non_allergen_score_parts(self):
self.assertEqual(['eggs'], Allergies(257).list)

Expand Down
8 changes: 8 additions & 0 deletions anagram/anagram_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,42 @@ def test_no_matches(self):
detect_anagrams('diaper', 'hello world zombies pants'.split())
)

@unittest.skip("")
def test_detect_simple_anagram(self):
self.assertEqual(
['tan'],
detect_anagrams('ant', 'tan stand at'.split())
)

@unittest.skip("")
def test_detect_multiple_anagrams(self):
self.assertEqual(
['stream', 'maters'],
detect_anagrams('master', 'stream pigeon maters'.split())
)

@unittest.skip("")
def test_does_not_confuse_different_duplicates(self):
self.assertEqual(
[],
detect_anagrams('galea', ['eagle'])
)

@unittest.skip("")
def test_eliminate_anagram_subsets(self):
self.assertEqual(
[],
detect_anagrams('good', 'dog goody'.split())
)

@unittest.skip("")
def test_detect_anagram(self):
self.assertEqual(
['inlets'],
detect_anagrams('listen', 'enlists google inlets banana'.split())
)

@unittest.skip("")
def test_multiple_anagrams(self):
self.assertEqual(
'gallery regally largely'.split(),
Expand All @@ -49,13 +55,15 @@ def test_multiple_anagrams(self):
)
)

@unittest.skip("")
def test_anagrams_are_case_insensitive(self):
self.assertEqual(
['Carthorse'],
detect_anagrams('Orchestra',
'cashregister Carthorse radishes'.split())
)

@unittest.skip("")
def test_same_word_isnt_anagram(self):
self.assertEqual(
[],
Expand Down
9 changes: 9 additions & 0 deletions atbash-cipher/atbash_cipher_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,43 @@ class AtbashCipherTest(unittest.TestCase):
def test_encode_no(self):
self.assertEqual("ml", encode("no"))

@unittest.skip("")
def test_encode_yes(self):
self.assertEqual("bvh", encode("yes"))

@unittest.skip("")
def test_encode_OMG(self):
self.assertEqual("lnt", encode("OMG"))

@unittest.skip("")
def test_encode_O_M_G(self):
self.assertEqual("lnt", encode("O M G"))

@unittest.skip("")
def test_encode_long_word(self):
self.assertEqual("nrmwy oldrm tob", encode("mindblowingly"))

@unittest.skip("")
def test_encode_numbers(self):
self.assertEqual("gvhgr mt123 gvhgr mt",
encode("Testing, 1 2 3, testing."))

@unittest.skip("")
def test_encode_sentence(self):
self.assertEqual("gifgs rhurx grlm",
encode("Truth is fiction."))

@unittest.skip("")
def test_encode_all_things(self):
plaintext = "The quick brown fox jumps over the lazy dog."
ciphertext = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
self.assertEqual(ciphertext, encode(plaintext))

@unittest.skip("")
def test_decode_word(self):
self.assertEqual("exercism", decode("vcvix rhn"))

@unittest.skip("")
def test_decode_sentence(self):
self.assertEqual("anobstacleisoftenasteppingstone",
decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v"))
Expand Down
7 changes: 6 additions & 1 deletion beer-song/beer_song_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest

from beer import song, verse
from beer_song import song, verse


class BeerTest(unittest.TestCase):
Expand All @@ -11,27 +11,31 @@ def test_a_verse(self):
"Take one down and pass it around, 7 bottles of beer on the wall.\n"
)

@unittest.skip("")
def test_verse_1(self):
self.assertEqual(
verse(1),
"1 bottle of beer on the wall, 1 bottle of beer.\n"
"Take it down and pass it around, no more bottles of beer on the wall.\n"
)

@unittest.skip("")
def test_verse_2(self):
self.assertEqual(
verse(2),
"2 bottles of beer on the wall, 2 bottles of beer.\n"
"Take one down and pass it around, 1 bottle of beer on the wall.\n"
)

@unittest.skip("")
def test_verse_0(self):
self.assertEqual(
verse(0),
"No more bottles of beer on the wall, no more bottles of beer.\n"
"Go to the store and buy some more, 99 bottles of beer on the wall.\n"
)

@unittest.skip("")
def test_songing_several_verses(self):
self.assertEqual(
song(8, 6),
Expand All @@ -46,6 +50,7 @@ def test_songing_several_verses(self):
"\n"
)

@unittest.skip("")
def test_song_all_the_rest_of_the_verses(self):
self.assertEqual(
song(3),
Expand Down
8 changes: 8 additions & 0 deletions binary/binary_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,35 @@ class BinaryTests(unittest.TestCase):
def test_binary_1_is_decimal_1(self):
self.assertEqual(1, parse_binary("1"))

@unittest.skip("")
def test_binary_10_is_decimal_2(self):
self.assertEqual(2, parse_binary("10"))

@unittest.skip("")
def test_binary_11_is_decimal_3(self):
self.assertEqual(3, parse_binary("11"))

@unittest.skip("")
def test_binary_100_is_decimal_4(self):
self.assertEqual(4, parse_binary("100"))

@unittest.skip("")
def test_binary_1001_is_decimal_9(self):
self.assertEqual(9, parse_binary("1001"))

@unittest.skip("")
def test_binary_11010_is_decimal_26(self):
self.assertEqual(26, parse_binary("11010"))

@unittest.skip("")
def test_binary_10001101000_is_decimal_1128(self):
self.assertEqual(1128, parse_binary("10001101000"))

@unittest.skip("")
def test_invalid_binary_raises_error(self):
self.assertRaises(ValueError, parse_binary, "carrot")

@unittest.skip("")
def test_invalid_binary_raises_error_2(self):
self.assertRaises(ValueError, parse_binary, "102011")

Expand Down
19 changes: 19 additions & 0 deletions bob/bob_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,101 +14,120 @@ def test_stating_something(self):
bob.hey('Tom-ay-to, tom-aaaah-to.')
)

@unittest.skip("")
def test_shouting(self):
self.assertEqual(
'Whoa, chill out!',
bob.hey('WATCH OUT!')
)

@unittest.skip("")
def test_asking_a_question(self):
self.assertEqual(
'Sure.',
bob.hey('Does this cryogenic chamber make me look fat?')
)

@unittest.skip("")
def test_asking_a_numeric_question(self):
self.assertEqual(
'Sure.',
bob.hey('You are, what, like 15?')
)

@unittest.skip("")
def test_talking_forcefully(self):
self.assertEqual(
'Whatever.',
bob.hey("Let's go make out behind the gym!")
)

@unittest.skip("")
def test_using_acronyms_in_regular_speech(self):
self.assertEqual(
'Whatever.', bob.hey("It's OK if you don't want to go to the DMV.")
)

@unittest.skip("")
def test_forceful_questions(self):
self.assertEqual(
'Whoa, chill out!', bob.hey('WHAT THE HELL WERE YOU THINKING?')
)

@unittest.skip("")
def test_shouting_numbers(self):
self.assertEqual(
'Whoa, chill out!', bob.hey('1, 2, 3 GO!')
)

@unittest.skip("")
def test_only_numbers(self):
self.assertEqual(
'Whatever.', bob.hey('1, 2, 3')
)

@unittest.skip("")
def test_question_with_only_numbers(self):
self.assertEqual(
'Sure.', bob.hey('4?')
)

@unittest.skip("")
def test_shouting_with_special_characters(self):
self.assertEqual(
'Whoa, chill out!',
bob.hey('ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!')
)

@unittest.skip("")
def test_shouting_with_umlauts(self):
self.assertEqual(
'Whoa, chill out!', bob.hey('ÜMLÄÜTS!')
)

@unittest.skip("")
def test_calmly_speaking_with_umlauts(self):
self.assertEqual(
'Whatever.', bob.hey('ÜMLäÜTS!')
)

@unittest.skip("")
def test_shouting_with_no_exclamation_mark(self):
self.assertEqual(
'Whoa, chill out!', bob.hey('I HATE YOU')
)

@unittest.skip("")
def test_statement_containing_question_mark(self):
self.assertEqual(
'Whatever.', bob.hey('Ending with ? means a question.')
)

@unittest.skip("")
def test_prattling_on(self):
self.assertEqual(
'Sure.', bob.hey("Wait! Hang on. Are you going to be OK?")
)

@unittest.skip("")
def test_silence(self):
self.assertEqual(
'Fine. Be that way!', bob.hey('')
)

@unittest.skip("")
def test_prolonged_silence(self):
self.assertEqual(
'Fine. Be that way!', bob.hey(' \t')
)

@unittest.skip("")
def test_starts_with_whitespace(self):
self.assertEqual(
'Whatever.', bob.hey(' hmmmmmmm...')
)

@unittest.skip("")
def test_ends_with_whitespace(self):
self.assertEqual(
'Sure.', bob.hey('What if we end with whitespace? ')
Expand Down
Loading