summaryrefslogtreecommitdiff
path: root/silx/io/test/test_spectoh5.py
diff options
context:
space:
mode:
authorAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2020-07-21 14:45:14 +0200
committerAlexandre Marie <alexandre.marie@synchrotron-soleil.fr>2020-07-21 14:45:14 +0200
commit328032e2317e3ac4859196bbf12bdb71795302fe (patch)
tree8cd13462beab109e3cb53410c42335b6d1e00ee6 /silx/io/test/test_spectoh5.py
parent33ed2a64c92b0311ae35456c016eb284e426afc2 (diff)
New upstream version 0.13.0+dfsg
Diffstat (limited to 'silx/io/test/test_spectoh5.py')
-rw-r--r--silx/io/test/test_spectoh5.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/silx/io/test/test_spectoh5.py b/silx/io/test/test_spectoh5.py
index 44b59e0..c3f03e9 100644
--- a/silx/io/test/test_spectoh5.py
+++ b/silx/io/test/test_spectoh5.py
@@ -39,7 +39,7 @@ __license__ = "MIT"
__date__ = "12/02/2018"
-sftext = """#F /tmp/sf.dat
+sfdata = b"""#F /tmp/sf.dat
#E 1455180875
#D Thu Feb 11 09:54:35 2016
#C imaging User = opid17
@@ -86,14 +86,11 @@ sftext = """#F /tmp/sf.dat
class TestConvertSpecHDF5(unittest.TestCase):
@classmethod
def setUpClass(cls):
- fd, cls.spec_fname = tempfile.mkstemp(text=False)
- if sys.version_info < (3, ):
- os.write(fd, sftext)
- else:
- os.write(fd, bytes(sftext, 'ascii'))
+ fd, cls.spec_fname = tempfile.mkstemp(prefix="TestConvertSpecHDF5")
+ os.write(fd, sfdata)
os.close(fd)
- fd, cls.h5_fname = tempfile.mkstemp(text=False)
+ fd, cls.h5_fname = tempfile.mkstemp(prefix="TestConvertSpecHDF5")
# Close and delete (we just need the name)
os.close(fd)
os.unlink(cls.h5_fname)