From ff15a05002b3aeb452bf766d93866a44a1b7a953 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 26 Nov 2017 13:00:02 +1000 Subject: [PATCH] bpo-32096: Ensure test can find the encodings module --- Programs/_testembed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 52a0b5124a37f0..21aa76e9de38bf 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -132,7 +132,8 @@ static int test_forced_io_encoding(void) static int test_pre_initialization_api(void) { - wchar_t *program = Py_DecodeLocale("spam", NULL); + /* Leading "./" ensures getpath.c can still find the standard library */ + wchar_t *program = Py_DecodeLocale("./spam", NULL); if (program == NULL) { fprintf(stderr, "Fatal error: cannot decode program name\n"); return 1;