Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

deprecated_methods_py3.py 1.1KB

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