From aed248610c844e9669fa8501af7495b0a8ab40a0 Mon Sep 17 00:00:00 2001 From: Yusuke Shinyama Date: Sat, 14 Jun 2014 12:05:26 +0900 Subject: [PATCH] Fixed: dependency on pygame in a unittest. --- pdfminer/ccitt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pdfminer/ccitt.py b/pdfminer/ccitt.py index 7e2dcb3..f8d269e 100644 --- a/pdfminer/ccitt.py +++ b/pdfminer/ccitt.py @@ -723,12 +723,12 @@ def ccittfaxdecode(data, params): # test def main(argv): - import pygame if not argv[1:]: return unittest.main() class Parser(CCITTG4Parser): def __init__(self, width, bytealign=False): + import pygame CCITTG4Parser.__init__(self, width, bytealign=bytealign) self.img = pygame.Surface((self.width, 1000)) return @@ -742,6 +742,7 @@ def main(argv): return def close(self): + import pygame pygame.image.save(self.img, 'out.bmp') return for path in argv[1:]: