diff options
author | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-09-25 13:49:02 +0200 |
---|---|---|
committer | Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> | 2018-10-02 13:50:35 +0200 |
commit | a433c01b28d8586bc7f429a540dbd7c9226c7fb6 (patch) | |
tree | 7e3c6023ee925e719e4a2f74eea20ef4f2b70e77 | |
parent | b48df83bf02183ff87063e9cf27459940c489c94 (diff) |
fix python3 tests
-rw-r--r-- | test/cfg.py | 2 | ||||
-rw-r--r-- | test/id03.py | 4 | ||||
-rw-r--r-- | test/metadata.py | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/test/cfg.py b/test/cfg.py index 9809e3d..6f25ecf 100644 --- a/test/cfg.py +++ b/test/cfg.py @@ -11,7 +11,7 @@ class TestCase(unittest.TestCase): def test_IO(self): self.cfg.totxtfile('test.txt') self.cfg.tofile('test.hdf5') - print binoculars.util.ConfigFile.fromfile('test.hdf5') + print(binoculars.util.ConfigFile.fromfile('test.hdf5')) self.assertRaises(IOError, binoculars.util.ConfigFile.fromtxtfile, '') self.assertRaises(IOError, binoculars.util.ConfigFile.fromfile, '') diff --git a/test/id03.py b/test/id03.py index 319ff66..df0c269 100644 --- a/test/id03.py +++ b/test/id03.py @@ -30,12 +30,12 @@ class TestCase(unittest.TestCase): space1 = binoculars.space.Space.from_image(self.projection.config.resolution, self.projection.get_axis_labels(), projected, intensity, weights, limits = limits[0]) - print space1 + print(space1) intensity, weights, coords = imagedata.next() projected = self.projection.project(*coords) space2 = binoculars.space.Space.from_image(self.projection.config.resolution, self.projection.get_axis_labels(), projected, intensity, weights) - print space1 + space2 + print(space1 + space2) def tearDown(self): os.remove('mask.npy') diff --git a/test/metadata.py b/test/metadata.py index ceca316..15d5eec 100644 --- a/test/metadata.py +++ b/test/metadata.py @@ -14,7 +14,7 @@ class TestCase(unittest.TestCase): test = {'string' : 'string', 'numpy.array' : numpy.arange(10), 'list' : range(10), 'tuple' : tuple(range(10))} metasection = binoculars.util.MetaBase() metasection.add_section('first', test) - print metasection + print(metasection) metadata = binoculars.util.MetaData() metadata.add_dataset(metasection) @@ -34,12 +34,12 @@ class TestCase(unittest.TestCase): space.tofile('test2.hdf5') testspace = binoculars.space.Space.fromfile('test2.hdf5') - print (space + testspace).metadata + print(space + testspace).metadata - print '--------------------------------------------------------' - print metadata - print metadata.serialize() - print binoculars.util.MetaData.fromserial(metadata.serialize()) + print('--------------------------------------------------------') + print(metadata) + print(metadata.serialize()) + print(binoculars.util.MetaData.fromserial(metadata.serialize())) def tearDown(self): os.remove('test.hdf5') |