In cqlshlib tests, don't overwrite the environment and improve hostname matching

patch by Jacek Lewandowski; reviewed by Mick Semb Wever for CASSANDRA-16409
This commit is contained in:
jacek-lewandowski 2021-01-27 15:12:30 +01:00 committed by Mick Semb Wever
parent f4be27fd07
commit 91cb934e25
No known key found for this signature in database
GPG Key ID: E91335D77E3E87CB
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ class CqlshCompletionCase(BaseTestCase):
remove_db()
def setUp(self):
env = os.environ
env = os.environ.copy()
env['COLUMNS'] = '100000'
if (locale.getpreferredencoding() != 'UTF-8'):
env['LC_CTYPE'] = 'en_US.utf8'

View File

@ -47,7 +47,7 @@ class TestCqlshOutput(BaseTestCase):
remove_db()
def setUp(self):
env = os.environ
env = os.environ.copy()
env['COLUMNS'] = '100000'
# carry forward or override locale LC_CTYPE for UTF-8 encoding
if (locale.getpreferredencoding() != 'UTF-8'):
@ -737,7 +737,7 @@ class TestCqlshOutput(BaseTestCase):
ringinfo_re = r'''
Range[ ]ownership: \n
(
[ ] .*? [ ][ ] \[ / ( \d+ \. ){3} \d+ : \d+ \] \n
[ ] .*? [ ][ ] \[ .*? / ( \d+ \. ){3} \d+ : \d+ \] \n
)+
\n
'''