Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctest crash #39159

Closed
abalkin opened this issue Aug 31, 2003 · 2 comments
Closed

doctest crash #39159

abalkin opened this issue Aug 31, 2003 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@abalkin
Copy link
Member

abalkin commented Aug 31, 2003

BPO 798254
Nosy @rhettinger, @abalkin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/rhettinger'
closed_at = <Date 2003-09-02.02:15:08.000>
created_at = <Date 2003-08-31.20:26:26.000>
labels = ['library']
title = 'doctest crash'
updated_at = <Date 2003-09-02.02:15:08.000>
user = 'https://github.com/abalkin'

bugs.python.org fields:

activity = <Date 2003-09-02.02:15:08.000>
actor = 'rhettinger'
assignee = 'rhettinger'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2003-08-31.20:26:26.000>
creator = 'belopolsky'
dependencies = []
files = []
hgrepos = []
issue_num = 798254
keywords = []
message_count = 2.0
messages = ['18028', '18029']
nosy_count = 2.0
nosy_names = ['rhettinger', 'belopolsky']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue798254'
versions = ['Python 2.3']

@abalkin
Copy link
Member Author

abalkin commented Aug 31, 2003

This code:

class A: 
        def f(self): pass 
 
class C(A): 
        g = A.f 
 
import doctest, sys 
doctest.testmod(sys.modules[__name__])

crashes with the following diagnostic:

Traceback (most recent call last): 
  File "<stdin>", line 8, in ? 
  File "/lib/python2.3/doctest.py", line 1147, in testmod 
    f, t = tester.rundict(m.__dict__, name, m) 
  File "/lib/python2.3/doctest.py", line 907, in rundict 
    f2, t2 = self.__runone(value, name + "." + thisname) 
  File "/lib/python2.3/doctest.py", line 1068, in __runone 
    return self.rundoc(target, name) 
  File "/lib/python2.3/doctest.py", line 827, in rundoc 
    f2, t2 = self.run__test__(d, name) 
  File "/lib/python2.3/doctest.py", line 936, in 
run__test__ 
    raise TypeError("Tester.run__test__: values in " 
TypeError: Tester.run__test__: values in dict must be 
strings, functions or classes; <unbound method A.f>

@abalkin abalkin closed this as completed Aug 31, 2003
@abalkin abalkin added the stdlib Python modules in the Lib dir label Aug 31, 2003
@abalkin abalkin closed this as completed Aug 31, 2003
@abalkin abalkin added the stdlib Python modules in the Lib dir label Aug 31, 2003
@rhettinger
Copy link
Contributor

Logged In: YES
user_id=80475

Applied patch bpo-798269

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants