コード例 #1
0
ファイル: test_itctools.py プロジェクト: MehtapIsik/itctools
 def _check_uniques(self, n, seq):
     """A set can't hold multiple copies of the same value.
     If the list only has uniques, it has the same length as the set.
     """
     compositions = itc.permutation_with_replacement(n, seq)
     self.assertEqual(len(compositions), len(set(compositions)))
コード例 #2
0
ファイル: test_itctools.py プロジェクト: haochenz96/itctools
 def _check_uniques(self, n, seq):
     """A set can't hold multiple copies of the same value.
     If the list only has uniques, it has the same length as the set.
     """
     compositions = itc.permutation_with_replacement(n, seq)
     self.assertEqual(len(compositions), len(set(compositions)))
コード例 #3
0
ファイル: test_itctools.py プロジェクト: MehtapIsik/itctools
 def _check_length(self, n, seq):
     """Makes sure that every sequence has the correct length.
     """
     compositions = itc.permutation_with_replacement(n, seq)
     for comp in compositions:
         self.assertEqual(len(comp), n)
コード例 #4
0
ファイル: test_itctools.py プロジェクト: haochenz96/itctools
 def _check_length(self, n, seq):
     """Makes sure that every sequence has the correct length.
     """
     compositions = itc.permutation_with_replacement(n, seq)
     for comp in compositions:
         self.assertEqual(len(comp), n)