Changeset 1709
- Timestamp:
- 08/23/07 14:01:04
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-3.0.x/cherrypy/test/test_http.py
r1275 r1709 35 35 len(gc.get_referrers(data))) 36 36 gc_stats.exposed = True 37 38 def gc_objtypes(self): 39 data = {} 40 for x in gc.get_objects(): 41 data[type(x)] = data.get(type(x), 0) + 1 42 43 data = [(v, k) for k, v in data.iteritems()] 44 data.sort() 45 return "\n".join([repr(pair) for pair in data]) 46 gc_objtypes.exposed = True 47 37 48 cherrypy.tree.mount(Root()) 38 49 cherrypy.config.update({'environment': 'test_suite'}) … … 70 81 self.getPage("/gc_stats") 71 82 self.assertBody("0 1 1 1") 83 84 # If gc_stats fails, choose "ignore" to see the type counts for 85 # all the unreachable objects in this body. 86 self.getPage("/gc_objtypes") 87 self.assertBody("") 72 88 73 89

