fix(collect): handle login target close race
Tests / Python 3.11 / Windows (push) Has been cancelled
Tests / Python 3.11 / Windows (push) Has been cancelled
This commit is contained in:
@@ -192,6 +192,26 @@ class AccountsTests(TempDirMixin, unittest.TestCase):
|
||||
|
||||
self.assert_removed(temp_dir)
|
||||
|
||||
def test_login_status_text_marks_target_failure_as_temporarily_uncertain(self):
|
||||
self.assertEqual(
|
||||
"登录状态暂不可确认",
|
||||
accounts.login_status_text(
|
||||
{
|
||||
"logged_in": False,
|
||||
"reason": "LOGIN_CHECK_TARGET_UNAVAILABLE",
|
||||
}
|
||||
),
|
||||
)
|
||||
self.assertEqual(
|
||||
"登录状态暂不可确认",
|
||||
accounts.login_status_text(
|
||||
{
|
||||
"logged_in": False,
|
||||
"reason": "LOGIN_CHECK_FAILED: Target closed",
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
def test_duplicate_alias_raises_clear_error(self):
|
||||
with self.make_temp_dir() as temp_dir:
|
||||
cfg = self.make_config(temp_dir)
|
||||
|
||||
Reference in New Issue
Block a user