Closes #25795: Merge with 3.5

This commit is contained in:
Zachary Ware 2015-12-04 23:33:59 -06:00
commit 2d2af91da0
8 changed files with 13 additions and 7 deletions

View file

@ -6,6 +6,7 @@ import os
import signal import signal
import sys import sys
import time import time
import unittest
from test.fork_wait import ForkWait from test.fork_wait import ForkWait
from test.support import (reap_children, get_attribute, from test.support import (reap_children, get_attribute,

View file

@ -1,6 +1,7 @@
import sys import sys
from test import support, list_tests from test import support, list_tests
import pickle import pickle
import unittest
class ListTest(list_tests.CommonTest): class ListTest(list_tests.CommonTest):
type2test = list type2test = list

View file

@ -5,7 +5,7 @@
import sys import sys
from types import FunctionType, MethodType, BuiltinFunctionType from types import FunctionType, MethodType, BuiltinFunctionType
import pyclbr import pyclbr
from unittest import TestCase from unittest import TestCase, main as unittest_main
StaticMethodType = type(staticmethod(lambda: None)) StaticMethodType = type(staticmethod(lambda: None))
ClassMethodType = type(classmethod(lambda c: None)) ClassMethodType = type(classmethod(lambda c: None))
@ -173,4 +173,4 @@ class PyclbrTest(TestCase):
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest_main()

View file

@ -4,8 +4,8 @@ import telnetlib
import time import time
import contextlib import contextlib
from unittest import TestCase
from test import support from test import support
import unittest
threading = support.import_module('threading') threading = support.import_module('threading')
HOST = support.HOST HOST = support.HOST
@ -21,7 +21,7 @@ def server(evt, serv):
finally: finally:
serv.close() serv.close()
class GeneralTests(TestCase): class GeneralTests(unittest.TestCase):
def setUp(self): def setUp(self):
self.evt = threading.Event() self.evt = threading.Event()
@ -170,7 +170,7 @@ def test_telnet(reads=(), cls=TelnetAlike):
telnet._messages = '' # debuglevel output telnet._messages = '' # debuglevel output
return telnet return telnet
class ExpectAndReadTestCase(TestCase): class ExpectAndReadTestCase(unittest.TestCase):
def setUp(self): def setUp(self):
self.old_selector = telnetlib._TelnetSelector self.old_selector = telnetlib._TelnetSelector
telnetlib._TelnetSelector = MockSelector telnetlib._TelnetSelector = MockSelector
@ -289,7 +289,7 @@ class nego_collector(object):
tl = telnetlib tl = telnetlib
class WriteTests(TestCase): class WriteTests(unittest.TestCase):
'''The only thing that write does is replace each tl.IAC for '''The only thing that write does is replace each tl.IAC for
tl.IAC+tl.IAC''' tl.IAC+tl.IAC'''
@ -305,7 +305,7 @@ class WriteTests(TestCase):
written = b''.join(telnet.sock.writes) written = b''.join(telnet.sock.writes)
self.assertEqual(data.replace(tl.IAC,tl.IAC+tl.IAC), written) self.assertEqual(data.replace(tl.IAC,tl.IAC+tl.IAC), written)
class OptionTests(TestCase): class OptionTests(unittest.TestCase):
# RFC 854 commands # RFC 854 commands
cmds = [tl.AO, tl.AYT, tl.BRK, tl.EC, tl.EL, tl.GA, tl.IP, tl.NOP] cmds = [tl.AO, tl.AYT, tl.BRK, tl.EC, tl.EL, tl.GA, tl.IP, tl.NOP]

View file

@ -1,4 +1,5 @@
from test import support, seq_tests from test import support, seq_tests
import unittest
import gc import gc
import pickle import pickle

View file

@ -1,6 +1,7 @@
# Check every path through every method of UserDict # Check every path through every method of UserDict
from test import support, mapping_tests from test import support, mapping_tests
import unittest
import collections import collections
d0 = {} d0 = {}

View file

@ -2,6 +2,7 @@
from collections import UserList from collections import UserList
from test import support, list_tests from test import support, list_tests
import unittest
class UserListTest(list_tests.CommonTest): class UserListTest(list_tests.CommonTest):
type2test = UserList type2test = UserList

View file

@ -4,6 +4,7 @@
import os import os
import time import time
import sys import sys
import unittest
from test.fork_wait import ForkWait from test.fork_wait import ForkWait
from test.support import reap_children, get_attribute from test.support import reap_children, get_attribute