Skip to content

Commit b7a523f

Browse files
committed
Attempt to fix integration tests on windows
1 parent 01f6bf5 commit b7a523f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
- "3.13"
4444

4545
runs-on: ${{ matrix.os }}
46+
env:
47+
PYTHONIOENCODING: utf-8
4648
steps:
4749
- name: Get source code
4850
uses: actions/checkout@v4
@@ -94,6 +96,8 @@ jobs:
9496
- "3.13"
9597

9698
runs-on: ${{ matrix.os }}
99+
env:
100+
PYTHONIOENCODING: utf-8
97101
steps:
98102
- name: Get source code
99103
uses: actions/checkout@v4

qgis_deployment_toolbelt/commands/upgrade.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import logging
1616
import sys
1717
from collections.abc import Iterable
18-
from os import getenv
18+
from os import environ, getenv
1919
from pathlib import Path
2020
from sys import platform as opersys
2121
from urllib.parse import urlsplit, urlunsplit
@@ -47,6 +47,9 @@
4747

4848
logger = logging.getLogger(__name__)
4949

50+
if sys.platform == "win32":
51+
environ["PYTHONIOENCODING"] = "utf-8"
52+
5053
# #############################################################################
5154
# ####### Functions ###############
5255
# #################################

0 commit comments

Comments
 (0)