From 26c037a08dfe94a5108c355bc92f067ae46351e3 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 14 Mar 2013 09:03:18 -0700 Subject: [PATCH 1/4] Disable debug prints in g4 tiff decoder --- libImaging/TiffDecode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libImaging/TiffDecode.h b/libImaging/TiffDecode.h index d05c309f2..ef92d46f4 100644 --- a/libImaging/TiffDecode.h +++ b/libImaging/TiffDecode.h @@ -47,9 +47,9 @@ extern int ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...); #define VA_ARGS(...) __VA_ARGS__ #define TRACE(args) fprintf(stderr, VA_ARGS args) -/* + #define TRACE(args) -*/ + #endif From a72d46d3147a206927b71385c54db8ab18fdeed4 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 14 Mar 2013 12:26:00 -0700 Subject: [PATCH 2/4] Disable debug messages during g4 tiff tests --- Tests/test_file_tiff.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index af1500c66..7ad965ab6 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -117,13 +117,13 @@ def test_g4_tiff_bytesio(): def xtest_g4_tiff_fail(): # UNDONE fails badly, unknown reason """The 128x128 lena image fails for some reason. Investigating""" - Image.DEBUG = True + Image.DEBUG = 0 file = "Tests/images/lena_g4.tif" im = Image.open(file) assert_equal(im.size, (128,128)) _assert_noerr(im) - Image.DEBUG = False + Image.DEBUG = 0 def test_g4_eq_png(): """ Checking that we're actually getting the data that we expect""" @@ -134,7 +134,7 @@ def test_g4_eq_png(): def test_g4_write(): """Checking to see that the saved image is the same as what we wrote""" - Image.DEBUG = True + Image.DEBUG = 0 file = "Tests/images/lena_g4_500.tif" orig = Image.open(file) @@ -151,4 +151,4 @@ def test_g4_write(): assert_false(orig.tobytes() == reread.tobytes()) - Image.DEBUG = False + Image.DEBUG = 0 From 8b440811b589e843fb8b65faf9ebf3346a1777d4 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 14 Mar 2013 12:34:56 -0700 Subject: [PATCH 3/4] Fix `support not installed` messages during selftest The extension modules are currently not installed in PIL but sys.path. --- selftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selftest.py b/selftest.py index 568518144..91a14bb54 100644 --- a/selftest.py +++ b/selftest.py @@ -157,7 +157,7 @@ def testimage(): def check_module(feature, module): try: - __import__("PIL." + module) + __import__(module) except ImportError: print("***", feature, "support not installed") else: From fa275f51b524ea53315a4ddd57634568a09e9ec7 Mon Sep 17 00:00:00 2001 From: Alex Clark Date: Thu, 14 Mar 2013 16:27:31 -0400 Subject: [PATCH 4/4] Cross plat fix --- Tests/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/run.py b/Tests/run.py index 14c9f6d5c..8ce2e714a 100644 --- a/Tests/run.py +++ b/Tests/run.py @@ -37,7 +37,7 @@ include = [x for x in sys.argv[1:] if x[:2] != "--"] skipped = [] # XXX Skip test, is there a better way? -files.remove('Tests/test_file_tiff.py') +files.remove(os.path.join('Tests', 'test_file_tiff.py')) skipped.append('test_file_tiff') python_options = " ".join(python_options)