Skip to content

Commit 806653a

Browse files
Merge pull request ClickHouse#79852 from ClickHouse/osx-sed
use python instead of sed in test script
2 parents c3d0a2f + e7d9101 commit 806653a

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
@@ -1179,7 +1179,10 @@ class MergeTreeSettingsRandomizer:
11791179

11801180

11811181
def replace_in_file(filename, what, with_what):
1182-
os.system(f"LC_ALL=C sed -i -e 's|{what}|{with_what}|g' {filename}")
1182+
with open(filename, "rb") as f:
1183+
data = f.read()
1184+
with open(filename, "wb") as f:
1185+
f.write(data.replace(what.encode(), with_what.encode()))
11831186

11841187

11851188
class TestResult:

0 commit comments

Comments
 (0)