[cleanup] Misc (#8598)

Authored by: bashonly, pukkandan, seproDev, Grub4K

Co-authored-by: bashonly <[email protected]>
Co-authored-by: pukkandan <[email protected]>
Co-authored-by: sepro <[email protected]>
This commit is contained in:
Simon Sawicki
2023-12-30 22:27:36 +01:00
committed by GitHub
co-authored by bashonly pukkandan sepro
parent 5f009a094f
commit f9fb3ce86e
30 changed files with 77 additions and 82 deletions
+2
View File
@@ -2110,6 +2110,8 @@ Line 1
self.assertEqual(traverse_obj(_TEST_DATA, (..., {str_or_none})),
[item for item in map(str_or_none, _TEST_DATA.values()) if item is not None],
msg='Function in set should be a transformation')
self.assertEqual(traverse_obj(_TEST_DATA, ('fail', {lambda _: 'const'})), 'const',
msg='Function in set should always be called')
if __debug__:
with self.assertRaises(Exception, msg='Sets with length != 1 should raise in debug'):
traverse_obj(_TEST_DATA, set())