From d461a10c6d06695b0fd3c2c897a4f784feccde16 Mon Sep 17 00:00:00 2001 From: 491034170 <142008960+491034170@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:06:24 +0800 Subject: [PATCH] Stabilize neo grandfather source tests on Windows --- backend/tests/unit/test_neo_desktop_grandfather.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/tests/unit/test_neo_desktop_grandfather.py b/backend/tests/unit/test_neo_desktop_grandfather.py index 12e9638f98e..37dea217570 100644 --- a/backend/tests/unit/test_neo_desktop_grandfather.py +++ b/backend/tests/unit/test_neo_desktop_grandfather.py @@ -164,7 +164,7 @@ class TestWebhookBuilderPopulatesPeriodStart: Verified by reading the source so we don't have to wire the full Stripe SDK.""" def test_builder_reads_current_period_start_active_path(self): - with open('routers/payment.py') as f: + with open('routers/payment.py', encoding='utf-8') as f: src = f.read() # Both the inactive-downgrade Subscription(...) and the active # Subscription(...) constructors must pass current_period_start. @@ -173,7 +173,7 @@ def test_builder_reads_current_period_start_active_path(self): ), "_build_subscription_from_stripe_object must set current_period_start on both branches" def test_reconcile_paths_set_current_period_start(self): - with open('utils/subscription.py') as f: + with open('utils/subscription.py', encoding='utf-8') as f: src = f.read() # find_active_paid_subscription_for_user + reconcile_basic_plan_with_stripe. assert ( @@ -188,7 +188,7 @@ class TestPolicyDocstring: """Sanity check that the policy comment + cutoff stay in sync with the code.""" def test_cutoff_is_env_overridable(self): - with open('utils/subscription.py') as f: + with open('utils/subscription.py', encoding='utf-8') as f: src = f.read() assert "NEO_DESKTOP_GRANDFATHER_CUTOFF" in src assert "os.getenv('NEO_DESKTOP_GRANDFATHER_CUTOFF'" in src