Skip to content

Commit 84e7153

Browse files
authored
Force Python scripts in acceptance tests to use UTF-8 (#3260)
## Changes A test failure in #3254 shows the Python scripts called from our acceptance tests were using `cp1252` encoding on Windows, which is incompatible with tests using UTF-8. This change makes these tests always use UTF-8. ## Tests Adds an emoji to the diff selftest.
1 parent 0629ca9 commit 84e7153

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

β€Žacceptance/selftest/diff/out_dir_a/output.txtβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Hello!
1+
Hello! πŸš€
22
{
33
"id": "[USERID]",
44
"userName": "[USERNAME]"

β€Žacceptance/selftest/diff/out_dir_b/output.txtβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Hello!
1+
Hello! πŸš€
22
{
33
"id": "[UUID]",
44
"userName": "[USERNAME]"

β€Žacceptance/selftest/diff/output.txtβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Only in out_dir_b: only_in_b
55
--- out_dir_a/output.txt
66
+++ out_dir_b/output.txt
77
@@ -1,5 +1,5 @@
8-
Hello!
8+
Hello! πŸš€
99
{
1010
- "id": "[USERID]",
1111
+ "id": "[UUID]",
@@ -18,7 +18,7 @@ Only in ../out_dir_b: only_in_b
1818
--- output.txt
1919
+++ ../out_dir_b/output.txt
2020
@@ -1,5 +1,5 @@
21-
Hello!
21+
Hello! πŸš€
2222
{
2323
- "id": "[USERID]",
2424
+ "id": "[UUID]",
@@ -29,7 +29,7 @@ Only in ../out_dir_b: only_in_b
2929
--- out_dir_a/output.txt
3030
+++ out_dir_b/output.txt
3131
@@ -1,5 +1,5 @@
32-
Hello!
32+
Hello! πŸš€
3333
{
3434
- "id": "[USERID]",
3535
+ "id": "[UUID]",

β€Žacceptance/selftest/diff/scriptβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ mkdir out_dir_b
44
touch out_dir_a/only_in_a
55
touch out_dir_b/only_in_b
66

7-
echo Hello! >> out_dir_a/output.txt
8-
echo Hello! >> out_dir_b/output.txt
7+
echo "Hello! πŸš€" >> out_dir_a/output.txt
8+
echo "Hello! πŸš€" >> out_dir_b/output.txt
99

1010
curl -s $DATABRICKS_HOST/api/2.0/preview/scim/v2/Me >> out_dir_a/output.txt
1111
printf "\n\nFooter\n" >> out_dir_a/output.txt

β€Žacceptance/test.tomlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ TimeoutCloud = '25m'
1313

1414
Env.PYTHONDONTWRITEBYTECODE = "1"
1515
Env.PYTHONUNBUFFERED = "1"
16+
Env.PYTHONUTF8 = "1"
1617

1718
EnvMatrix.DATABRICKS_CLI_DEPLOYMENT = ["terraform", "direct-exp"]
1819
EnvRepl.DATABRICKS_CLI_DEPLOYMENT = false

0 commit comments

Comments
Β (0)