Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
test.test_inspect.TestBuggyCases Class Reference
Inheritance diagram for test.test_inspect.TestBuggyCases:
Inheritance graph
[legend]
Collaboration diagram for test.test_inspect.TestBuggyCases:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_with_comment
def test_multiline_sig
def test_nested_class
def test_one_liner_followed_by_non_name
def test_one_liner_dedent_non_name
def test_with_comment_instead_of_docstring
def test_method_in_dynamic_class
def test_findsource_binary
def test_findsource_code_in_linecache
def sourcerange
def assertSourceEqual

Public Attributes

 source

Static Public Attributes

 fodderModule = mod2

Detailed Description

Definition at line 369 of file test_inspect.py.


Member Function Documentation

def test.test_inspect.GetSourceBase.assertSourceEqual (   self,
  obj,
  top,
  bottom 
) [inherited]

Definition at line 211 of file test_inspect.py.

00211 
00212     def assertSourceEqual(self, obj, top, bottom):
00213         self.assertEqual(inspect.getsource(obj),
00214                          self.sourcerange(top, bottom))

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_inspect.GetSourceBase.sourcerange (   self,
  top,
  bottom 
) [inherited]

Definition at line 207 of file test_inspect.py.

00207 
00208     def sourcerange(self, top, bottom):
00209         lines = self.source.split("\n")
00210         return "\n".join(lines[top-1:bottom]) + "\n"

Here is the caller graph for this function:

Definition at line 397 of file test_inspect.py.

00397 
00398     def test_findsource_binary(self):
00399         self.assertRaises(IOError, inspect.getsource, unicodedata)
00400         self.assertRaises(IOError, inspect.findsource, unicodedata)

Here is the call graph for this function:

Definition at line 401 of file test_inspect.py.

00401 
00402     def test_findsource_code_in_linecache(self):
00403         lines = ["x=1"]
00404         co = compile(lines[0], "_dynamically_created_file", "exec")
00405         self.assertRaises(IOError, inspect.findsource, co)
00406         self.assertRaises(IOError, inspect.getsource, co)
00407         linecache.cache[co.co_filename] = (1, None, lines, co.co_filename)
00408         self.assertEqual(inspect.findsource(co), (lines,0))
00409         self.assertEqual(inspect.getsource(co), lines[0])

Here is the call graph for this function:

Definition at line 390 of file test_inspect.py.

00390 
00391     def test_method_in_dynamic_class(self):
00392         self.assertSourceEqual(mod2.method_in_dynamic_class, 95, 97)

Here is the call graph for this function:

Definition at line 375 of file test_inspect.py.

00375 
00376     def test_multiline_sig(self):
00377         self.assertSourceEqual(mod2.multiline_sig[0], 63, 64)

Here is the call graph for this function:

Definition at line 378 of file test_inspect.py.

00378 
00379     def test_nested_class(self):
00380         self.assertSourceEqual(mod2.func69().func71, 71, 72)

Here is the call graph for this function:

Definition at line 384 of file test_inspect.py.

00384 
00385     def test_one_liner_dedent_non_name(self):
00386         self.assertSourceEqual(mod2.cls82.func83, 83, 83)

Here is the call graph for this function:

Definition at line 381 of file test_inspect.py.

00381 
00382     def test_one_liner_followed_by_non_name(self):
00383         self.assertSourceEqual(mod2.func77, 77, 77)

Here is the call graph for this function:

Definition at line 372 of file test_inspect.py.

00372 
00373     def test_with_comment(self):
00374         self.assertSourceEqual(mod2.with_comment, 58, 59)

Here is the call graph for this function:

Definition at line 387 of file test_inspect.py.

00387 
00388     def test_with_comment_instead_of_docstring(self):
00389         self.assertSourceEqual(mod2.func88, 88, 90)

Here is the call graph for this function:


Member Data Documentation

Reimplemented from test.test_inspect.GetSourceBase.

Definition at line 370 of file test_inspect.py.

Definition at line 205 of file test_inspect.py.


The documentation for this class was generated from the following file: