Ticket #6221: internet-deprecate.patch

File internet-deprecate.patch, 3.2 KB (added by Julian Berman, 9 years ago)
  • twisted/internet/test/test_core.py

    diff --git a/twisted/internet/test/test_core.py b/twisted/internet/test/test_core.py
    index 76c1eef..4ebc1c0 100644
    a b class SystemEventTestsBuilder(ReactorBuilder): 
    270270        reactor.iterate(0) # Shouldn't block
    271271        elapsed = time.time() - start
    272272
    273         self.failUnless(elapsed < 2)
     273        self.assertTrue(elapsed < 2)
    274274        t.cancel()
    275275
    276276
  • twisted/internet/test/test_glibbase.py

    diff --git a/twisted/internet/test/test_glibbase.py b/twisted/internet/test/test_glibbase.py
    index 53524cd..26c3311 100644
    a b class EnsureNotImportedTests(TestCase): 
    2828        self.patch(sys, "modules", modules)
    2929        ensureNotImported(["m1", "m2"], "A message.",
    3030                          preventImports=["m1", "m2", "m3"])
    31         self.assertEquals(modules, {"m1": None, "m2": None, "m3": None})
     31        self.assertEqual(modules, {"m1": None, "m2": None, "m3": None})
    3232
    3333
    3434    def test_ensureWhenNotImportedDontPrevent(self):
    class EnsureNotImportedTests(TestCase): 
    3939        modules = {}
    4040        self.patch(sys, "modules", modules)
    4141        ensureNotImported(["m1", "m2"], "A message.")
    42         self.assertEquals(modules, {})
     42        self.assertEqual(modules, {})
    4343
    4444
    4545    def test_ensureWhenFailedToImport(self):
    class EnsureNotImportedTests(TestCase): 
    5050        modules = {"m2": None}
    5151        self.patch(sys, "modules", modules)
    5252        ensureNotImported(["m1", "m2"], "A message.", preventImports=["m1", "m2"])
    53         self.assertEquals(modules, {"m1": None, "m2": None})
     53        self.assertEqual(modules, {"m1": None, "m2": None})
    5454
    5555
    5656    def test_ensureFailsWhenImported(self):
    class EnsureNotImportedTests(TestCase): 
    6464        e = self.assertRaises(ImportError, ensureNotImported,
    6565                              ["m1", "m2"], "A message.",
    6666                              preventImports=["m1", "m2"])
    67         self.assertEquals(modules, {"m2": module})
    68         self.assertEquals(e.args, ("A message.",))
     67        self.assertEqual(modules, {"m2": module})
     68        self.assertEqual(e.args, ("A message.",))
  • twisted/internet/test/test_iocp.py

    diff --git a/twisted/internet/test/test_iocp.py b/twisted/internet/test/test_iocp.py
    index 76d7646..ac93cdf 100644
    a b class IOCPReactorTestCase(unittest.TestCase): 
    108108        """
    109109        ir = IOCPReactor()
    110110        ir.wakeUp()
    111         self.failIf(ir.doIteration(None))
     111        self.assertFalse(ir.doIteration(None))
    112112
    113113
    114114    def test_reactorInterfaces(self):
  • twisted/internet/test/test_threads.py

    diff --git a/twisted/internet/test/test_threads.py b/twisted/internet/test/test_threads.py
    index 1436918..ddb2c69 100644
    a b class ThreadTestsBuilder(ReactorBuilder): 
    124124                          reactor.callFromThread, threadCall)
    125125        self.runReactor(reactor, 5)
    126126
    127         self.assertEquals(result, [threading.currentThread()])
     127        self.assertEqual(result, [threading.currentThread()])
    128128
    129129
    130130    def test_stopThreadPool(self):