Skip to content

Commit

Permalink
added in a few tests for the roman numeral conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewschoen committed Oct 13, 2012
1 parent fa66982 commit 36ed37d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_utils.py
Expand Up @@ -3,9 +3,10 @@
from unittest import TestCase
from xhtml2pdf.util import getCoords, getColor, getSize, getFrameDimensions, \
getPos, getBox
from xhtml2pdf.tags import int_to_roman

class UtilsCoordTestCase(TestCase):

def test_getCoords_simple(self):

res = getCoords(1, 1, 10, 10, (10,10))
Expand Down Expand Up @@ -240,4 +241,11 @@ def test_get_pos_raising(self):
except Exception:
raised = True
self.assertTrue(raised)

class TestTagUtils(TestCase):
def test_roman_numeral_conversion(self):
self.assertEqual("I", int_to_roman(1))
self.assertEqual("L", int_to_roman(50))
self.assertEqual("XLII", int_to_roman(42))
self.assertEqual("XXVI", int_to_roman(26))

0 comments on commit 36ed37d

Please sign in to comment.