コード例 #1
0
ファイル: tests_lists.py プロジェクト: avrma-forks/PySkCode
 def test_int_to_alphabet_numerals(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     self.assertEqual('A', int_to_alphabet_numerals(1))
     self.assertEqual('B', int_to_alphabet_numerals(2))
     self.assertEqual('C', int_to_alphabet_numerals(3))
     self.assertEqual('Z', int_to_alphabet_numerals(26))
     self.assertEqual('AA', int_to_alphabet_numerals(27))
     self.assertEqual('AB', int_to_alphabet_numerals(28))
     self.assertEqual('AZ', int_to_alphabet_numerals(52))
コード例 #2
0
ファイル: tests_lists.py プロジェクト: TamiaLab/PySkCode
 def test_int_to_alphabet_numerals(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     self.assertEqual('A', int_to_alphabet_numerals(1))
     self.assertEqual('B', int_to_alphabet_numerals(2))
     self.assertEqual('C', int_to_alphabet_numerals(3))
     self.assertEqual('Z', int_to_alphabet_numerals(26))
     self.assertEqual('AA', int_to_alphabet_numerals(27))
     self.assertEqual('AB', int_to_alphabet_numerals(28))
     self.assertEqual('AZ', int_to_alphabet_numerals(52))
コード例 #3
0
ファイル: tests_lists.py プロジェクト: avrma-forks/PySkCode
 def test_int_to_alphabet_numerals_no_value(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     self.assertEqual('', int_to_alphabet_numerals(0))
コード例 #4
0
ファイル: tests_lists.py プロジェクト: avrma-forks/PySkCode
 def test_int_to_alphabet_numerals_assertion(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     with self.assertRaises(AssertionError) as e:
         int_to_alphabet_numerals(-1)
     self.assertEqual('Value can only be positive.', str(e.exception))
コード例 #5
0
ファイル: tests_lists.py プロジェクト: TamiaLab/PySkCode
 def test_int_to_alphabet_numerals_no_value(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     self.assertEqual('', int_to_alphabet_numerals(0))
コード例 #6
0
ファイル: tests_lists.py プロジェクト: TamiaLab/PySkCode
 def test_int_to_alphabet_numerals_assertion(self):
     """ Test the ``int_to_alphabet_numerals`` helper routine. """
     with self.assertRaises(AssertionError) as e:
         int_to_alphabet_numerals(-1)
     self.assertEqual('Value can only be positive.', str(e.exception))