blob: 06a8517b5a2a0a3d72dde248f63a45da21bc3717 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
""" Functional tests for method deprecation. """
# pylint: disable=missing-docstring, super-init-not-called, not-callable
import base64
import cgi
import inspect
import logging
import nntplib
import platform
import unittest
import xml.etree.ElementTree
class MyTest(unittest.TestCase):
def test(self):
self.assert_(True) # [deprecated-method]
xml.etree.ElementTree.Element('tag').getchildren() # [deprecated-method]
xml.etree.ElementTree.Element('tag').getiterator() # [deprecated-method]
xml.etree.ElementTree.XMLParser('tag', None, None).doctype(None, None, None) # [deprecated-method]
nntplib.NNTP(None).xpath(None) # [deprecated-method]
inspect.getmoduleinfo(inspect) # [deprecated-method]
inspect.getmodulename(inspect) # [deprecated-method]
inspect.getargspec(None) # [deprecated-method]
logging.warn("a") # [deprecated-method]
platform.popen([]) # [deprecated-method]
base64.encodestring("42") # [deprecated-method]
base64.decodestring("42") # [deprecated-method]
cgi.escape("a") # [deprecated-method]
class SuperCrash(unittest.TestCase):
def __init__(self):
# should not crash.
super(SuperCrash, self)()
|