summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2014-04-19 17:41:41 -0700
committerTushar Gohad <tushar.gohad@intel.com>2014-04-19 17:41:41 -0700
commit33a456b58a2d5bf8a4d73965b0ca6d7475b7365a (patch)
tree5cc85d8cc99a39bda564c8926e270b9394299ae8
parente0d4dc8a5aa13082d6bdeba08d2a4857e6ee5386 (diff)
downloadpyeclib-33a456b58a2d5bf8a4d73965b0ca6d7475b7365a.tar.gz
Use str.ascii_letters for Python3 compatibility (take2)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
-rw-r--r--src/python/pyeclib/ec_test.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/python/pyeclib/ec_test.py b/src/python/pyeclib/ec_test.py
index a239b10..8545fc8 100644
--- a/src/python/pyeclib/ec_test.py
+++ b/src/python/pyeclib/ec_test.py
@@ -29,6 +29,7 @@ import string
import sys
import os
+from string import ascii_letters
class TestNullDriver(unittest.TestCase):
@@ -79,7 +80,7 @@ class TestPyECLibDriver(unittest.TestCase):
elif (size_desc[1] == 'K'):
size *= 1000
- buf = ''.join(random.choice(string.letters)
+ buf = ''.join(random.choice(string.ascii_letters)
for i in range(size))
filename = "test_file.%s" % size_str
@@ -146,7 +147,7 @@ class TestPyECLibDriver(unittest.TestCase):
filesize = 1024 * 1024 * 3
- file_str = ''.join(random.choice(string.letters)
+ file_str = ''.join(random.choice(string.ascii_letters)
for i in range(filesize))
fragment_to_corrupt = random.randint(0, 12)
@@ -201,7 +202,7 @@ class TestPyECLibDriver(unittest.TestCase):
filesize = 1024 * 1024 * 3
- file_str = ''.join(random.choice(string.letters)
+ file_str = ''.join(random.choice(string.ascii_letters)
for i in range(filesize))
for pyeclib_driver in pyeclib_drivers:
@@ -242,7 +243,7 @@ class TestPyECLibDriver(unittest.TestCase):
filesize = 1024 * 1024 * 3
- file_str = ''.join(random.choice(string.letters)
+ file_str = ''.join(random.choice(string.ascii_letters)
for i in range(filesize))
fragment_to_corrupt = random.randint(0, 12)
@@ -291,7 +292,7 @@ class TestPyECLibDriver(unittest.TestCase):
filesize = 1024 * 1024 * 3
- file_str = ''.join(random.choice(string.letters)
+ file_str = ''.join(random.choice(string.ascii_letters)
for i in range(filesize))
for pyeclib_driver in pyeclib_drivers: