8000 about 50% on the test suite · libvips/pyvips@1896b66 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1896b66

Browse files
committed
about 50% on the test suite
1 parent 37f284d commit 1896b66

13 files changed

+89
-107
lines changed

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ Local user install::
4848

4949
Run test suite::
5050

51-
$ nosetests
51+
$ nosetests |& more
52+
$ nosetests --logging-level=WARNING
5253

5354
Converting old code
5455
-------------------

pyvips/tests/test_arithmetic.py

100755100644
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
#!/usr/bin/env python
2-
31
from __future__ import division
42
import unittest
53
import math
64

7-
#import logging
8-
#logging.basicConfig(level = logging.DEBUG)
5+
# import logging
6+
# logging.basicConfig(level = logging.DEBUG)
97

108
import pyvips
119

@@ -695,6 +693,3 @@ def test_sum(self):
695693
im2 = [(im + x).cast(fmt) for x in range(0, 100, 10)]
696694
im3 = pyvips.Image.sum(im2)
697695
self.assertAlmostEqual(im3.max(), sum(range(0, 100, 10)))
698-
699-
if __name__ == '__main__':
700-
unittest.main()

pyvips/tests/test_colour.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/python
21
# vim: set fileencoding=utf-8 :
32

43
import unittest
@@ -253,6 +252,3 @@ def test_icc(self):
253252
self.assertEqual(im.interpretation, pyvips.Interpretation.XYZ)
254253
im = test.icc_import()
255254
self.assertEqual(im.interpretation, pyvips.Interpretation.LAB)
256-
257-
if __name__ == '__main__':
258-
unittest.main()

pyvips/tests/test_conversion.py

100755100644
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/usr/bin/python
2-
# vim: set fileencoding=utf-8 :
3-
41
from __future__ import division
52
import unittest
63
import math
@@ -831,6 +828,3 @@ def test_wrap(self):
831828
before = test(50, 50)
832829
after = im(0, 0)
833830
self.assertAlmostEqualObjects(before, after)
834-
835-
if __name__ == '__main__':
836-
unittest.main()

pyvips/tests/test_convolution.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python3
2-
31
from __future__ import division
42
from numbers import Number
53
from functools import reduce
@@ -265,5 +263,3 @@ def test_sharpen(self):
265263
#print("max diff = %g" % (im - sharp).abs().max())
266264
self.assertEqual((im - sharp).abs().max(), 0)
267265

268-
if __name__ == '__main__':
269-
unittest.main()

pyvips/tests/test_create.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python
2-
31
import unittest
42
import math
53

@@ -453,5 +451,3 @@ def test_perlin(self):
453451
self.assertEqual(im.bands, 1)
454452
self.assertEqual(im.format, pyvips.BandFormat.FLOAT)
455453

456-
if __name__ == '__main__':
457-
unittest.main()

pyvips/tests/test_draw.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python
2-
31
import unittest
42
import math
53

@@ -126,5 +124,3 @@ def test_draw_smudge(self):
126124
diff = (im4 - im).abs().max()
127125
self.assertEqual(diff, 0)
128126

129-
if __name__ == '__main__':
130-
unittest.main()

pyvips/tests/test_foreign.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/python
21
# vim: set fileencoding=utf-8 :
32

43
from __future__ import division
@@ -788,6 +787,3 @@ def test_dzsave(self):
788787
# we can't test the bytes are exactly equal, the timestamps will be
789788
# different
790789

791-
if __name__ == '__main__':
792-
unittest.main()
793-

pyvips/tests/test_histogram.py

100755100644
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/python
21
# vim: set fileencoding=utf-8 :
32

43
import unittest
@@ -138,5 +137,3 @@ def test_stdif(self):
138137
# new mean should be closer to target mean
139138
self.assertTrue(abs(im.avg() - 128) > abs(im2.avg() - 128))
140139

141-
if __name__ == '__main__':
142-
unittest.main()

pyvips/tests/test_iofuncs.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python3
2-
31
from __future__ import division
42
import unittest
53
import math
@@ -60,5 +58,3 @@ def split(path):
6058
for case in cases:
6159
self.assertEqualObjects(split(case[0]), case[1])
6260

63-
if __name__ == '__main__':
64-
unittest.main()

pyvips/tests/test_morphology.py

100755100644
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/python
2-
31
import unittest
42
import math
53

@@ -80,5 +78,3 @@ def test_rank(self):
8078
self.assertEqual(im.bands, im2.bands)
8179
self.assertTrue(im2.avg() > im.avg())
8280

83-
if __name__ == '__main__':
84-
unittest.main()

pyvips/tests/test_resample.py

100755100644
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/python
21
# vim: set fileencoding=utf-8 :
32

43
import unittest
@@ -252,5 +251,3 @@ def test_mapim(self):
252251
b = im.crop(50, 0, im.width - 50, im.height).gaussblur(2)
253252
self.assertLess((a - b).abs().max(), 20)
254253

255-
if __name__ == '__main__':
256-
unittest.main()

0 commit comments

Comments
 (0)
0