From 91cb934e25020f83dcb289be9c03292579b5d33b Mon Sep 17 00:00:00 2001 From: jacek-lewandowski Date: Wed, 27 Jan 2021 15:12:30 +0100 Subject: [PATCH] In cqlshlib tests, don't overwrite the environment and improve hostname matching patch by Jacek Lewandowski; reviewed by Mick Semb Wever for CASSANDRA-16409 --- pylib/cqlshlib/test/test_cqlsh_completion.py | 2 +- pylib/cqlshlib/test/test_cqlsh_output.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pylib/cqlshlib/test/test_cqlsh_completion.py b/pylib/cqlshlib/test/test_cqlsh_completion.py index d432f225c1..6fe94dd806 100644 --- a/pylib/cqlshlib/test/test_cqlsh_completion.py +++ b/pylib/cqlshlib/test/test_cqlsh_completion.py @@ -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' diff --git a/pylib/cqlshlib/test/test_cqlsh_output.py b/pylib/cqlshlib/test/test_cqlsh_output.py index 496216726a..324587d3df 100644 --- a/pylib/cqlshlib/test/test_cqlsh_output.py +++ b/pylib/cqlshlib/test/test_cqlsh_output.py @@ -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 '''