def test_main(debug=0): from guppy.heapy.Remote import off off() support.run_unittest(FirstCase, debug) support.run_unittest(GCCase, debug) support.run_unittest(AltHeapCase, debug) support.run_unittest(SpecialTypesCase, debug)
def process_response(self, request, response): if settings.DEBUG: if request.GET.has_key('mem_prof'): import guppy out = StringIO() heapy = guppy.hpy() out.write(str(heapy.heap())) out.write('\n\n\n\n') out_str = out.getvalue() if response and response.content and out_str: response.content = "<pre>" + out_str + "</pre>" elif request.GET.has_key('mem_on'): from guppy.heapy.Remote import on on() elif request.GET.has_key('mem_off'): from guppy.heapy.Remote import off off() return response
def test_main(debug = 0): from guppy.heapy.Remote import off; off() support.run_unittest(FirstCase, debug) support.run_unittest(GCCase, debug) support.run_unittest(AltHeapCase, debug) support.run_unittest(SpecialTypesCase, debug)
for a in ers: print(a[0].ljust(10), end=' ', file=f) for b in ers: print(str((a[1] < b[1]))[:1].ljust(7), end=' ', file=f) print(file=f) self.aseq( f.getvalue(), """\ Clodo Id Idset Module Rcs Size Type Unity Size&Type \n\ Clodo F F F F F F T T F \n\ Id F F F F F F F T F \n\ Idset F F F F F F F T F \n\ Module F F F F F F F T F \n\ Rcs F F F F F F F T F \n\ Size F F F F F F F T F \n\ Type F F F F F F F T F \n\ Unity F F F F F F F F F \n\ Size&Type F F F F F T T T F \n\ """) def test_main(debug=0): support.run_unittest(FirstCase, debug) if __name__ == "__main__": from guppy.heapy.Remote import off off() test_main()
print >>f for a in ers: print >>f, a[0].ljust(10), for b in ers: print >>f, str((a[1] < b[1]))[:1].ljust(7), print >>f self.aseq( f.getvalue(), """\ Class Clodo Id Idset Module Rcs Size Type Unity Size&Type Class F F F F F F F T T F Clodo T F F F F F F T T F Id F F F F F F F F T F Idset F F F F F F F F T F Module F F F F F F F F T F Rcs F F F F F F F F T F Size F F F F F F F F T F Type F F F F F F F F T F Unity F F F F F F F F F F Size&Type F F F F F F T T T F """) def test_main(debug = 0): support.run_unittest(FirstCase, debug) if __name__ == "__main__": from guppy.heapy.Remote import off off() test_main()