Beispiel #1
0
 def test_deprecation(self):
     self.assertWarns(DeprecationWarning,
                      ("dsu is deprecated since Twisted 10.1. "
                       "Use the built-in sorted() instead."), __file__,
                      lambda: util.dsu([], lambda: 0))
Beispiel #2
0
 def test_deprecation(self):
     self.assertWarns(DeprecationWarning,
                      ("dsu is deprecated since Twisted 10.1. "
                       "Use the built-in sorted() instead."),
                      __file__, lambda: util.dsu([], lambda: 0))
Beispiel #3
0
 def test_dsu(self):
     L = [Foo(x) for x in range(20, 9, -1)]
     L2 = util.dsu(L, lambda o: o.x)
     self.assertEquals(range(10, 21), [o.x for o in L2])
Beispiel #4
0
 def test_dsu(self):
     L = [Foo(x) for x in range(20, 9, -1)]
     L2 = util.dsu(L, lambda o: o.x)
     self.assertEquals(range(10, 21), [o.x for o in L2])