Exemple #1
0
 def _reset_iters(self):
     """
     Reset depends, rdepends, post_rdepends, and provides properties
     to current matches' related attributes.
     """
     cur = self.matches_cur
     self._deps = cur.depends.cnf_solutions()
     self._rdeps = cur.rdepends.cnf_solutions()
     self._prdeps = cur.post_rdepends.cnf_solutions()
     self._provides = tuple(iter_stable_unique(cur.provides))
Exemple #2
0
 def _reset_iters(self):
     """
     Reset depends, rdepends, post_rdepends, and provides properties
     to current matches' related attributes.
     """
     cur = self.matches_cur
     self._deps = cur.depends.cnf_solutions()
     self._rdeps = cur.rdepends.cnf_solutions()
     self._prdeps = cur.post_rdepends.cnf_solutions()
     self._provides = tuple(iter_stable_unique(cur.provides))
Exemple #3
0
 def test_iter_stable_unique(self):
     self.test_stable_unique(lambda x: list(lists.iter_stable_unique(x)))
     o = UnhashableComplex()
     l = [1, 2, 3, o, UnhashableComplex(), 4, 3, UnhashableComplex()]
     self.assertEqual(list(lists.iter_stable_unique(l)),
                      [1, 2, 3, o, 4])
Exemple #4
0
 def _reset_iters(self):
     cur = self.matches_cur
     self._deps = cur.depends.cnf_solutions()
     self._rdeps = cur.rdepends.cnf_solutions()
     self._prdeps = cur.post_rdepends.cnf_solutions()
     self._provides = tuple(iter_stable_unique(cur.provides))
Exemple #5
0
 def test_iter_stable_unique(self):
     self.test_stable_unique(lambda x: list(lists.iter_stable_unique(x)))
     o = UnhashableComplex()
     l = [1, 2, 3, o, UnhashableComplex(), 4, 3, UnhashableComplex()]
     self.assertEqual(list(lists.iter_stable_unique(l)), [1, 2, 3, o, 4])