Removed the print statements from the test code.

This commit is contained in:
capitanbatata
2014-09-11 11:09:27 +02:00
parent 272e9310d2
commit f078bcf779
2 changed files with 6 additions and 10 deletions
+1
View File
@@ -72,6 +72,7 @@ except ImportError:
del version
try:
_imp.find_module('nose')
except ImportError:
+5 -10
View File
@@ -236,13 +236,11 @@ class TestColorconv(TestCase):
## Test the conversion with the rest of the illuminants.
for I in ["d50", "d55", "d65", "d75"]:
for obs in ["2", "10"]:
print("testing illuminant={0}, observer={1}".format(I, obs))
fname = "lab_array_{0}_{1}.npy".format(I, obs)
lab_array_I_obs = np.load(os.path.join(os.path.dirname(__file__), 'data', fname))
assert_array_almost_equal(lab_array_I_obs,
xyz2lab(self.xyz_array, I, obs), decimal=2)
for I in ["a", "e"]:
print("testing illuminant={0}, observer=2".format(I))
fname = "lab_array_{0}_2.npy".format(I)
lab_array_I_obs = np.load(os.path.join(os.path.dirname(__file__), 'data', fname))
assert_array_almost_equal(lab_array_I_obs,
@@ -267,15 +265,14 @@ class TestColorconv(TestCase):
## And we include a call to test the exception handling in the code.
try:
xs = lab2xyz(lab_array_I_obs, "NaI", "2") # Not an illuminant
xs = lab2xyz(lab_array_I_obs, "NaI", "2") # Not an illuminant
except ValueError:
print 'Correctly handled the unknown illuminant case.'
pass
try:
xs = lab2xyz(lab_array_I_obs, "d50", "42") # Not an illuminant
xs = lab2xyz(lab_array_I_obs, "d50", "42") # Not an observer degree
except ValueError:
print 'Correctly handled the unknown observer case.'
pass
def test_rgb2lab_brucelindbloom(self):
"""
@@ -310,13 +307,11 @@ class TestColorconv(TestCase):
## Test the conversion with the rest of the illuminants.
for I in ["d50", "d55", "d65", "d75"]:
for obs in ["2", "10"]:
print("testing illuminant={0}, observer={1}".format(I, obs))
fname = "luv_array_{0}_{1}.npy".format(I, obs)
luv_array_I_obs = np.load(os.path.join(os.path.dirname(__file__), 'data', fname))
assert_array_almost_equal(luv_array_I_obs,
xyz2luv(self.xyz_array, I, obs), decimal=2)
for I in ["a", "e"]:
print("testing illuminant={0}, observer=2".format(I))
fname = "luv_array_{0}_2.npy".format(I)
luv_array_I_obs = np.load(os.path.join(os.path.dirname(__file__), 'data', fname))
assert_array_almost_equal(luv_array_I_obs,