diff --git a/src/__init__.py b/src/__init__.py index 7ccd6bebf..a7ff0abc1 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -3560,16 +3560,12 @@ def close(self): #self._reset_page_refs() #self.metadata = None #self.stream = None - #self.is_closed = True + self.is_closed = True #self.FontInfos = [] #self.Graftmaps = {} #self.ShownPages = {} #self.InsertedImages = {} - #self.this = None - self.close_internal() - - def close_internal(self): self.this = None def convert_to_pdf(self, from_page=0, to_page=-1, rotate=0): diff --git a/tests/test_general.py b/tests/test_general.py index bfb6ae185..9eb7c51c6 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -153,6 +153,7 @@ def test_bug1971(): page = next(doc.pages()) page.get_drawings() doc.close() + assert doc.is_closed def test_default_font(): f = fitz.Font()