Ethan Furman added the comment:

The global fix causes these two tests to fail:

======================================================================
FAIL: test_newstyle_mro (test.test_inspect.TestClassesAndFunctions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ethan/source/python/issue18693/Lib/test/test_inspect.py", line 
485, in test_newstyle_mro
    self.assertEqual(expected, got)
AssertionError: Tuples differ: (<class 'test.test_inspect.Tes... != (<class 
'test.test_inspect.Tes...

Second tuple contains 1 additional elements.
First extra element 5:
<class 'type'>

  (<class 
'test.test_inspect.TestClassesAndFunctions.test_newstyle_mro.<locals>.D'>,
   <class 
'test.test_inspect.TestClassesAndFunctions.test_newstyle_mro.<locals>.B'>,
   <class 
'test.test_inspect.TestClassesAndFunctions.test_newstyle_mro.<locals>.C'>,
   <class 
'test.test_inspect.TestClassesAndFunctions.test_newstyle_mro.<locals>.A'>,
-  <class 'object'>)
?                  ^

+  <class 'object'>,
?                  ^

+  <class 'type'>)

======================================================================
FAIL: test_help_output_redirect (test.test_pydoc.PydocDocTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ethan/source/python/issue18693/Lib/test/test_pydoc.py", line 396, 
in test_help_output_redirect
    self.assertEqual(expected_text, result)
AssertionError: "Help on module test.pydoc_mod in test:\n\nNAME\n    
test.pydoc_mod - This is a  [truncated]... != "Help on module test.pydoc_mod in 
test:\n\nNAME\n    test.pydoc_mod - This is a  [truncated]...
  Help on module test.pydoc_mod in test:
  
  NAME
      test.pydoc_mod - This is a test module for test_pydoc
  
  CLASSES
      builtins.object
          A
          B
      
      class A(builtins.object)
       |  Hello and goodbye
+      |  
+      |  Method resolution order:
+      |      A
+      |      builtins.object
+      |      builtins.type
       |  
       |  Methods defined here:
       |  
       |  __init__()
       |      Wow, I have no function!
       |  
       |  ----------------------------------------------------------------------
       |  Data descriptors defined here:
       |  
       |  __dict__
       |      dictionary for instance variables (if defined)
       |  
       |  __weakref__
       |      list of weak references to the object (if defined)
      
      class B(builtins.object)
+      |  Method resolution order:
+      |      B
+      |      builtins.object
+      |      builtins.type
+      |  
       |  Data descriptors defined here:
       |  
       |  __dict__
       |      dictionary for instance variables (if defined)
       |  
       |  __weakref__
       |      list of weak references to the object (if defined)
       |  
       |  ----------------------------------------------------------------------
       |  Data and other attributes defined here:
       |  
       |  NO_MEANING = 'eggs'
  
======================================================================

I suspect (hope) updating the tests would be fine.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18929>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to