コード例 #1
0
ファイル: test_wordlib.py プロジェクト: steder/words
 def test_5_choose_2(self):
     self.assertEqual(wordlib.combinations(5, 2), 10)
コード例 #2
0
ファイル: test_wordlib.py プロジェクト: steder/words
 def test_n_choose_n(self):
     """
     This case is part of why combinations are much faster.
     """
     self.assertEqual(wordlib.combinations(5, 5), 1)
コード例 #3
0
ファイル: test_wordlib.py プロジェクト: steder/words
 def test_5_choose_1(self):
     self.assertEqual(wordlib.combinations(5, 1), 5)