"""
This type stub file was generated by pyright.
"""

import collections
import attr
import wrapt
from typing import Any, Mapping
from absl.testing import parameterized

"""Tests for utilities working with arbitrarily nested structures."""
STRUCTURE1 = ...
STRUCTURE2 = ...
STRUCTURE_DIFFERENT_NUM_ELEMENTS = ...
STRUCTURE_DIFFERENT_NESTING = ...
class DoctestTest(parameterized.TestCase):
  def testDoctest(self): # -> None:
    ...
  


class NestTest(parameterized.TestCase):
  def assertAllEquals(self, a, b): # -> None:
    ...
  
  def testAttrsFlattenAndUnflatten(self): # -> None:
    class BadAttr:
      """Class that has a non-iterable __attrs_attrs__."""
      ...
    
    
    @attr.s
    class SampleAttr:
      ...
    
    
  
  @parameterized.parameters([(1, 2, 3), ({ "B": 10,"A": 20 }, [1, 2], 3), ((1, 2), [3, 4], 5), (collections.namedtuple("Point", ["x", "y"])(1, 2), 3, 4), wrapt.ObjectProxy((collections.namedtuple("Point", ["x", "y"])(1, 2), 3, 4))])
  def testAttrsMapStructure(self, *field_values): # -> None:
    @attr.s
    class SampleAttr:
      ...
    
    
  
  def testFlattenAndUnflatten(self): # -> None:
    ...
  
  def testFlattenDictOrder(self): # -> None:
    ...
  
  def testUnflattenDictOrder(self): # -> None:
    ...
  
  def testFlattenAndUnflatten_withDicts(self): # -> None:
    ...
  
  def testFlatten_numpyIsNotFlattened(self): # -> None:
    ...
  
  def testFlatten_stringIsNotFlattened(self): # -> None:
    ...
  
  def testFlatten_bytearrayIsNotFlattened(self): # -> None:
    ...
  
  def testUnflattenSequenceAs_notIterableError(self): # -> None:
    ...
  
  def testUnflattenSequenceAs_wrongLengthsError(self): # -> None:
    ...
  
  def testUnflattenSequenceAs_defaultdict(self): # -> None:
    ...
  
  def testIsSequence(self): # -> None:
    ...
  
  Named0ab = ...
  Named1ab = ...
  SameNameab = ...
  SameNameab2 = ...
  SameNamexy = ...
  SameName1xy = ...
  SameName1xy2 = ...
  NotSameName = ...
  class SameNamedType1(SameNameab):
    ...
  
  
  def testAssertSameStructure(self): # -> None:
    ...
  
  def testAssertSameStructure_differentNumElements(self): # -> None:
    ...
  
  def testAssertSameStructure_listVsNdArray(self): # -> None:
    ...
  
  def testAssertSameStructure_intVsList(self): # -> None:
    ...
  
  def testAssertSameStructure_tupleVsList(self): # -> None:
    ...
  
  def testAssertSameStructure_differentNesting(self): # -> None:
    ...
  
  def testAssertSameStructure_tupleVsNamedTuple(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNamedTupleDifferentContents(self): # -> None:
    ...
  
  def testAssertSameStructure_differentNamedTuples(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNamedTupleDifferentStructuredContents(self): # -> None:
    ...
  
  def testAssertSameStructure_differentlyNestedLists(self): # -> None:
    ...
  
  def testAssertSameStructure_listStructureWithAndWithoutTypes(self): # -> None:
    ...
  
  def testAssertSameStructure_dictionaryDifferentKeys(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNameNamedTuples(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNameNamedTuplesNested(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNameNamedTuplesDifferentStructure(self): # -> None:
    ...
  
  def testAssertSameStructure_differentNameNamedStructures(self): # -> None:
    ...
  
  def testAssertSameStructure_sameNameDifferentFieldNames(self): # -> None:
    ...
  
  def testAssertSameStructure_classWrappingNamedTuple(self): # -> None:
    ...
  
  def testMapStructure(self): # -> None:
    ...
  
  def testMapStructureWithStrings(self): # -> None:
    ...
  
  def testAssertShallowStructure(self): # -> None:
    ...
  
  def testFlattenUpTo(self): # -> None:
    @attr.s
    class ABAttr:
      ...
    
    
  
  def testByteStringsNotTreatedAsIterable(self): # -> None:
    ...
  
  def testFlattenWithPathUpTo(self): # -> None:
    ...
  
  def testMapStructureUpTo(self): # -> None:
    ...
  
  Foo = ...
  Bar = ...
  @parameterized.parameters([dict(inputs=[], expected=[]), dict(inputs=[23, "42"], expected=[((0, ), 23), ((1, ), "42")]), dict(inputs=[[[[108]]]], expected=[((0, 0, 0, 0), 108)]), dict(inputs=Foo(a=3, b=Bar(c=23, d=42)), expected=[(("a", ), 3), (("b", "c"), 23), (("b", "d"), 42)]), dict(inputs=Foo(a=Bar(c=23, d=42), b=Bar(c=0, d="thing")), expected=[(("a", "c"), 23), (("a", "d"), 42), (("b", "c"), 0), (("b", "d"), "thing")]), dict(inputs=Bar(c=42, d=43), expected=[(("c", ), 42), (("d", ), 43)]), dict(inputs=Bar(c=[42], d=43), expected=[(("c", 0), 42), (("d", ), 43)]), dict(inputs=wrapt.ObjectProxy(Bar(c=[42], d=43)), expected=[(("c", 0), 42), (("d", ), 43)])])
  def testFlattenWithPath(self, inputs, expected): # -> None:
    ...
  
  @parameterized.named_parameters([dict(testcase_name="Tuples", s1=(1, 2), s2=(3, 4), check_types=True, expected=(((0, ), 4), ((1, ), 6))), dict(testcase_name="Dicts", s1={ "a": 1,"b": 2 }, s2={ "b": 4,"a": 3 }, check_types=True, expected={ "a": (("a", ), 4),"b": (("b", ), 6) }), dict(testcase_name="Mixed", s1=(1, 2), s2=[3, 4], check_types=False, expected=(((0, ), 4), ((1, ), 6))), dict(testcase_name="Nested", s1={ "a": [2, 3],"b": [1, 2, 3] }, s2={ "b": [5, 6, 7],"a": [8, 9] }, check_types=True, expected={ "a": [(("a", 0), 10), (("a", 1), 12)],"b": [(("b", 0), 6), (("b", 1), 8), (("b", 2), 10)] })])
  def testMapWithPathCompatibleStructures(self, s1, s2, check_types, expected): # -> None:
    ...
  
  @parameterized.named_parameters([dict(testcase_name="Tuples", s1=(1, 2, 3), s2=(4, 5), error_type=ValueError), dict(testcase_name="Dicts", s1={ "a": 1 }, s2={ "b": 2 }, error_type=ValueError), dict(testcase_name="Nested", s1={ "a": [2, 3, 4],"b": [1, 3] }, s2={ "b": [5, 6],"a": [8, 9] }, error_type=ValueError)])
  def testMapWithPathIncompatibleStructures(self, s1, s2, error_type): # -> None:
    ...
  
  def testMappingProxyType(self): # -> None:
    ...
  
  def testTraverseListsToTuples(self): # -> None:
    ...
  
  def testTraverseEarlyTermination(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesDict(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesNoneValues(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesList(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesTuple(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesNamedTuple(self): # -> None:
    ...
  
  def testMapStructureAcrossSubtreesListTuple(self): # -> None:
    ...
  
  def testNoneNodeIncluded(self): # -> None:
    ...
  
  def testCustomClassMapWithPath(self): # -> None:
    class ExampleClass(Mapping[Any, Any]):
      """Small example custom class."""
      ...
    
    
  


if __name__ == "__main__":
  ...
