Beispiel #1
0
 def test_to_roman_known_values(self):
     '''to_roman should give known result with known input
     '''
     for integer, numeral in self.known_values:
         result = roman.to_roman(integer)
         self.assertEqual(numeral, result)
Beispiel #2
0
 def test_roundtrip(self):
     for integer in range(1, 4000): # equivalent to xrange since python3
         numeral = roman.to_roman(integer)
         result = roman.from_roman(numeral)
         self.assertEqual(integer, result)
Beispiel #3
0
 def test_roundtrip(self):
     for integer in range(1, 4000):  # equivalent to xrange since python3
         numeral = roman.to_roman(integer)
         result = roman.from_roman(numeral)
         self.assertEqual(integer, result)
Beispiel #4
0
"""
for absolute import to work well with script running in your python dir, you need:
1 - either install your package with pip/some systems
2 - using the -m flag - i.e. running python modules as script:  python -m

https://stackoverflow.com/questions/6323860/sibling-package-imports/23542795#23542795
"""
from pyexp import roman
from pydata.pydata_lib import test_glob
from pydata.submodule.submodule import print_machine_stats

##  Actual testing ground
test_glob()
print_machine_stats()
print(roman.to_roman(12))
Beispiel #5
0
 def test_to_roman_known_values(self):
     '''to_roman should give known result with known input
     '''
     for integer, numeral in self.known_values:
         result = roman.to_roman(integer)
         self.assertEqual(numeral, result)