Fixed: dependency on pygame in a unittest.
parent
8e14ebf4e1
commit
aed248610c
|
@ -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:]:
|
||||
|
|
Loading…
Reference in New Issue