From 804fa635e63ddcff86c6143f9b0062576177d80f Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Thu, 11 May 2017 19:33:45 +0100 Subject: [PATCH] 10039: Fix imports test for non-US locales --- gramps/plugins/test/imports_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gramps/plugins/test/imports_test.py b/gramps/plugins/test/imports_test.py index 3014ac17f..3dd8c2a06 100644 --- a/gramps/plugins/test/imports_test.py +++ b/gramps/plugins/test/imports_test.py @@ -25,6 +25,7 @@ import unittest import os import sys import re +import locale from time import localtime, strptime from unittest.mock import patch #import logging @@ -49,6 +50,9 @@ TEST_DIR = os.path.abspath(os.path.join(DATA_DIR, "tests")) # Local Functions # ------------------------------------------------------------------ +# These tests assume a US date and time format. +locale.setlocale(locale.LC_ALL, 'en_US.utf8') + def mock_time(*args): """ Mock up a dummy to replace the varying 'time string results'