From 3157285e27a426530ef571855e0e29c317e210df Mon Sep 17 00:00:00 2001 From: VIZZARD-X Date: Wed, 26 Nov 2025 14:06:20 +0530 Subject: Fixed #27150 -- Made base File objects truthy by default. --- tests/files/tests.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/files/tests.py b/tests/files/tests.py index cfda70053f..9ee27b741f 100644 --- a/tests/files/tests.py +++ b/tests/files/tests.py @@ -233,6 +233,9 @@ class NoNameFileTestCase(unittest.TestCase): def test_noname_file_get_size(self): self.assertEqual(File(BytesIO(b"A file with no name")).size, 19) + def test_noname_bool(self): + self.assertTrue(bool(File(BytesIO(b"A file with no name")))) + class ContentFileTestCase(unittest.TestCase): def test_content_file_default_name(self): -- cgit v1.3