You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/Babel/files/Babel-2.9.0-pypy3.patch

34 lines
1.1 KiB

From a291ee5da29fb9767ce8dc5f94e3fa19908f2596 Mon Sep 17 00:00:00 2001
From: Keri Volans <keri.volans@gmail.com>
Date: Sun, 10 May 2020 18:43:58 +0100
Subject: [PATCH] tests/test_dates.py: Fix broken test
datetime was being incorrectly patched, so the unittest was failing
Closes https://github.com/python-babel/babel/issues/675
---
tests/test_dates.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/test_dates.py b/tests/test_dates.py
index 5be0d16a..3cd70d3e 100644
--- a/tests/test_dates.py
+++ b/tests/test_dates.py
@@ -761,7 +761,6 @@ def test_zh_TW_format():
def test_format_current_moment(monkeypatch):
- import datetime as datetime_module
frozen_instant = datetime.utcnow()
class frozen_datetime(datetime):
@@ -771,7 +770,7 @@ def utcnow(cls):
return frozen_instant
# Freeze time! Well, some of it anyway.
- monkeypatch.setattr(datetime_module, "datetime", frozen_datetime)
+ monkeypatch.setattr(dates, "datetime_", frozen_datetime)
assert dates.format_datetime(locale="en_US") == dates.format_datetime(frozen_instant, locale="en_US")