Home
last modified time | relevance | path

Searched refs:Hashable (Results 1 - 12 of 12) sorted by relevance

/third_party/python/Lib/test/
H A Dtest_hash.py11 from collections.abc import Hashable namespace
143 self.assertIsInstance(obj, Hashable)
147 self.assertNotIsInstance(obj, Hashable)
H A Dtest_collections.py23 from collections.abc import Hashable, Iterable, Iterator, Generator, Reversible namespace
905 self.assertNotIsInstance(x, Hashable)
906 self.assertFalse(issubclass(type(x), Hashable), repr(type(x)))
915 self.assertIsInstance(x, Hashable)
916 self.assertTrue(issubclass(type(x), Hashable), repr(type(x)))
917 self.assertRaises(TypeError, Hashable)
919 class H(Hashable):
924 self.validate_abstract_methods(Hashable, '__hash__')
925 self.validate_isinstance(Hashable, '__hash__')
1374 for B in Hashable, Iterabl
[all...]
H A Dtest_types.py814 typing.Hashable, typing.TypeVar('T'))
846 eq(x[typing.Hashable], int | typing.Hashable | bytes)
847 eq(x[collections.abc.Hashable],
848 int | collections.abc.Hashable | bytes, typed=False)
H A Dtest_genericalias.py143 for t in int, str, float, Sized, Hashable:
H A Dtest_typing.py5619 self.assertIsInstance(42, typing.Hashable)
5620 self.assertNotIsInstance([], typing.Hashable)
6087 self.assertEqual(typing.Coroutine | typing.Hashable, Union[typing.Coroutine, typing.Hashable])
7961 typing.Hashable: 'Hashable',
H A Dtest_functools.py944 self.assertNotIsInstance(k, collections.abc.Hashable)
/third_party/skia/third_party/externals/abseil-cpp/absl/container/internal/
H A Dhash_function_defaults_test.cc349 // Hashable<H> is hashable via all means specified in H.
351 struct Hashable { struct
357 struct hash<Hashable<H>> {
358 template <class E = Hashable<H>,
377 EXPECT_EQ(Hash(kStd), Hash(Hashable<kStd>())); in TEST()
/third_party/skia/third_party/externals/abseil-cpp/absl/types/
H A Doptional_test.cc30 struct Hashable {}; struct
34 struct hash<Hashable> {
35 size_t operator()(const Hashable&) { return 0; } in operator ()()
1511 static_assert(is_hash_enabled_for<absl::optional<Hashable>>::value, ""); in TEST()
1515 absl::type_traits_internal::IsHashable<absl::optional<Hashable>>::value, in TEST()
1518 absl::type_traits_internal::AssertHashEnabled<absl::optional<Hashable>>(); in TEST()
1532 static_assert(is_hash_enabled_for<absl::optional<const Hashable>>::value, ""); in TEST()
H A Dvariant_test.cc61 struct Hashable {}; struct
65 struct hash<Hashable> {
66 size_t operator()(const Hashable&);
2073 static_assert(type_traits_internal::IsHashable<variant<Hashable>>::value, ""); in TEST()
2074 static_assert(type_traits_internal::IsHashable<variant<int, Hashable>>::value, in TEST()
2081 !type_traits_internal::IsHashable<variant<Hashable, NonHashable>>::value, in TEST()
2109 type_traits_internal::IsHashable<variant<const Hashable>>::value, ""); in TEST()
/third_party/python/Lib/
H A D_collections_abc.py20 "Hashable", "Iterable", "Iterator", "Generator", "Reversible",
90 class Hashable(metaclass=ABCMeta): class
100 if cls is Hashable:
H A Dtyping.py68 'Hashable',
1541 # _nparams is the number of accepted parameters, e.g. 0 for Hashable,
1966 'Hashable', 'Sized', 'Container', 'Collection', 'Reversible',
2673 Hashable = _alias(collections.abc.Hashable, 0) # Not generic. variable
/third_party/PyYAML/lib/yaml/
H A Dconstructor.py140 if not isinstance(key, collections.abc.Hashable):

Completed in 46 milliseconds