Skip to content

Commit e7d9101

Browse files
use python instead of sed in test script
1 parent 2a5d0b0 commit e7d9101

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/clickhouse-test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1174,7 +1174,10 @@ class MergeTreeSettingsRandomizer:
11741174

11751175

11761176
def replace_in_file(filename, what, with_what):
1177-
os.system(f"LC_ALL=C sed -i -e 's|{what}|{with_what}|g' {filename}")
1177+
with open(filename, "rb") as f:
1178+
data = f.read()
1179+
with open(filename, "wb") as f:
1180+
f.write(data.replace(what.encode(), with_what.encode()))
11781181

11791182

11801183
class TestResult:

0 commit comments

Comments
 (0)