예제 #1
0
    def test_meliae_dump_error(self):
        """Check the error case."""
        from meliae import scanner

        dump_all_objects = self.mocker.replace(scanner.dump_all_objects)
        dump_all_objects(ANY)
        self.mocker.throw(ValueError)
        self.mocker.replay()

        self.assertIn("Error while trying to dump memory", meliae_dump())
예제 #2
0
    def test_meliae_dump_error(self):
        """Check the error case."""
        from meliae import scanner

        dump_all_objects = self.mocker.replace(scanner.dump_all_objects)
        dump_all_objects(ANY)
        self.mocker.throw(ValueError)
        self.mocker.replay()

        self.assertIn("Error while trying to dump memory", meliae_dump())
예제 #3
0
    def test_meliae_dump(self):
        """Check that the dump works."""
        from meliae import scanner

        collect = self.mocker.replace(gc.collect)
        dump_all_objects = self.mocker.replace(scanner.dump_all_objects)

        collect()
        dump_all_objects(ANY)
        self.mocker.replay()

        self.assertIn("Output written to:", meliae_dump())
예제 #4
0
    def test_meliae_dump(self):
        """Check that the dump works."""
        from meliae import scanner

        collect = self.mocker.replace(gc.collect)
        dump_all_objects = self.mocker.replace(scanner.dump_all_objects)

        collect()
        dump_all_objects(ANY)
        self.mocker.replay()

        self.assertIn("Output written to:", meliae_dump())
예제 #5
0
 def render_GET(self, request):
     """Handle GET."""
     return dump.meliae_dump()
예제 #6
0
 def render_GET(self, request):
     """Handle GET."""
     return dump.meliae_dump()