Show More
@@ -53,6 +53,11 b' class Dummy1(object):' | |||||
53 | class Dummy2(Dummy1): |
|
53 | class Dummy2(Dummy1): | |
54 | _repr_pretty_ = None |
|
54 | _repr_pretty_ = None | |
55 |
|
55 | |||
|
56 | class NoModule(object): | |||
|
57 | pass | |||
|
58 | ||||
|
59 | NoModule.__module__ = None | |||
|
60 | ||||
56 |
|
61 | |||
57 | def test_indentation(): |
|
62 | def test_indentation(): | |
58 | """Test correct indentation in groups""" |
|
63 | """Test correct indentation in groups""" | |
@@ -106,3 +111,10 b' def test_pprint_heap_allocated_type():' | |||||
106 | import xxlimited |
|
111 | import xxlimited | |
107 | output = pretty.pretty(xxlimited.Null) |
|
112 | output = pretty.pretty(xxlimited.Null) | |
108 | nt.assert_equal(output, 'xxlimited.Null') |
|
113 | nt.assert_equal(output, 'xxlimited.Null') | |
|
114 | ||||
|
115 | def test_pprint_nomod(): | |||
|
116 | """ | |||
|
117 | Test that pprint works for classes with no __module__. | |||
|
118 | """ | |||
|
119 | output = pretty.pretty(NoModule) | |||
|
120 | nt.assert_equal(output, 'NoModule') |
General Comments 0
You need to be logged in to leave comments.
Login now