Skip to content

Commit e2c6b4a

Browse files
[update-checkout] finalize using utf-8 encoding in all subprocess invocations
1 parent 0002aec commit e2c6b4a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

utils/update_checkout/tests/scheme_mock.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def __str__(self):
9494

9595
def call_quietly(*args, **kwargs):
9696
kwargs["stderr"] = subprocess.STDOUT
97+
kwargs["encoding"] = "utf-8"
9798
try:
9899
return subprocess.check_output(*args, **kwargs)
99100
except subprocess.CalledProcessError as e:

utils/update_checkout/tests/test_clone.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_clone_with_additional_scheme(self):
5454
)
5555

5656
# Test that we're actually checking out the 'extra' scheme based on the output
57-
self.assertIn("git checkout refs/heads/main", output.decode("utf-8"))
57+
self.assertIn("git checkout refs/heads/main", output)
5858

5959

6060
class SchemeWithMissingRepoTestCase(scheme_mock.SchemeMockTestCase):

0 commit comments

Comments
 (0)