Skip to content
Browse files

Merge branch 'master' of https://github.com/markeganfuller/londondojo…

  • Loading branch information...
2 parents a8893fd + 90dbf83 commit 35809c0546ca29b1722d7ed2de68035b9245e59f @libscott libscott committed Dec 4, 2012
Showing with 33 additions and 10 deletions.
  1. +33 −10 tests.py
View
43 tests.py
@@ -1,30 +1,53 @@
import unittest
+from roman import *
class RomanNumeralTest(unittest.TestCase):
- def test_prep_numeral():
+ def test_prep_numeral(self):
input_num = "IV"
- expected = "IIII"
+ expected = ["I", "I", "I", "I"]
result = prep_numeral(input_num)
self.assertEqual(result, expected)
- def test_sort_numeral():
- input_num = "XXL"
- expected = "LXX"
+ input_num = "XC"
+ expected = ["X", "X", "X", "X", "L"]
+
+ result = prep_numeral(input_num)
+
+ self.assertEqual(result, expected)
+
+ def test_sort_numeral(self):
+ input_num = "X", "X", "L"
+ expected = list("LXX")
result = sort_numeral(input_num)
self.assertEqual(result, expected)
- def test_compress_numeral():
- input_num = "IIIIIIII"
+ def test_compress_numeral(self):
+ input_num = list("IIIIIIII")
expected = "VIII"
result = compress_numeral(input_num)
- self.assertEqual(result,expected)
+ self.assertEqual(result, expected)
+
+ # def test_20_50(self):
+ # input_num1 = "XX"
+ # input_num2 = "L"
+ # expected = "LXX"
+
+ # result = add_numerals(input_num1, input_num2)
+
+ # self.assertEqual(result, expected)
- def test_20_50():
- twenty = "XX"
+ def test_26_200(self):
+ input_num1 = "XXVI"
+ input_num2 = "CC"
+ expected = "CCXXVI"
+
+ result = add_numerals(input_num1, input_num2)
+
+ self.assertEqual(result, expected)

0 comments on commit 35809c0

Please sign in to comment.
Something went wrong with that request. Please try again.