]> www.infradead.org Git - users/hch/nvmetcli.git/commit
test_nvmet.py: test_invalid_input fails for py3
authorTony Asleson <tasleson@redhat.com>
Thu, 26 Mar 2020 18:07:49 +0000 (13:07 -0500)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Apr 2020 09:00:14 +0000 (11:00 +0200)
commit477a04b18e8754dc3f75110f0e7e6cdac70217aa
tree7516fd9e4c7d1c0018277157187e298055c4e3ee
parent75c178f6c2943490ef2c13df5863d6ac308f6ef1
test_nvmet.py: test_invalid_input fails for py3

When you run 'make test' using python 3 the unit test
test_invalid_input fails with:

Traceback (most recent call last):
  File "/someuser/projects/nvmetcli/nvmet/test_nvmet.py", line 395, in
test_invalid_input
    for i in range(l))
  File "/someuser/projects/nvmetcli/nvmet/test_nvmet.py", line 395, in
<genexpr>
    for i in range(l))
AttributeError: module 'string' has no attribute 'lowercase'

Python 3 does not have 'string.lowercase' ref.
https://docs.python.org/3/library/string.html

Python 2 does ref.
https://docs.python.org/2/library/string.html

Both have "string.ascii_lowercase" so lets leverage that to
support both.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
nvmet/test_nvmet.py