summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVIZZARD-X <vigneshanandmay13@gmail.com>2025-11-26 14:06:20 +0530
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2026-04-14 14:32:08 +0300
commit3157285e27a426530ef571855e0e29c317e210df (patch)
tree90f58a2e72a2541fbbeb90909daa57fea5f37491 /tests
parent8d326336c5fba4740114fea5294a7b426c96d65c (diff)
Fixed #27150 -- Made base File objects truthy by default.
Diffstat (limited to 'tests')
-rw-r--r--tests/files/tests.py3
1 files changed, 3 insertions, 0 deletions
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):