Add Type XRefs to IR #166
Test report - Python 3.10 + typedoc 0.21 ❌
❌ test-results.xml
71 tests were completed in 17s with 49 passed, 21 failed and 1 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 49✔️ | 21❌ | 1✖️ | 17s |
❌ pytest
tests.test_incremental
✔️ test_incremental_ts
tests.test_init
✔️ test_relative_path_root
tests.test_ir
✔️ test_default
✔️ test_missing_default
tests.test_parsers
✔️ test_escapes
✔️ test_relative_dirs
tests.test_paths
✔️ test_global
✔️ test_node_modules1
✔️ test_node_modules2
✔️ test_env1
✔️ test_env2
✔️ test_err
tests.test_suffix_tree
✔️ test_things
✔️ test_full_path
✔️ test_terminal_insertion
✔️ test_ambiguous_even_if_full_path
✔️ test_ambiguous_paths_reported
✔️ test_value_ambiguity
tests.test_testing
✔️ test_dict_where
tests.test_build_ts.test_build_ts.TextBuilderTests
✔️ test_abstract_extends_and_implements
✔️ test_autoclass_constructor
✔️ test_autoclass_order
✔️ test_autoclass_star_order
✔️ test_constructorless_class
✔️ test_exported_from
✔️ test_optional_members
tests.test_build_ts.test_build_ts.HtmlBuilderTests
✔️ test_extends_links
✔️ test_implements_links
tests.test_common_mark.test_common_mark.Tests
✔️ test_build_success
tests.test_dot_dot_paths.test_dot_dot_paths.Tests
✔️ test_dot_dot
tests.test_typedoc_analysis.test_typedoc_analysis.PopulateIndexTests
✔️ test_top_level_function
tests.test_typedoc_analysis.test_typedoc_analysis.PathSegmentsTests
✔️ test_class
✔️ test_constructor
✔️ test_function
✔️ test_getter
✔️ test_instance_property
✔️ test_interface_property
✔️ test_method
✔️ test_namespaced_var
✖️ test_relative_paths
✔️ test_setter
✔️ test_static_method
✔️ test_static_property
✔️ test_weird_name
tests.test_typedoc_analysis.test_typedoc_analysis.ConvertNodeTests
✔️ test_class1
✔️ test_constructor
❌ test_function
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_function>
❌ test_getter
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_getter>
✔️ test_interface
✔️ test_interface_function_member
✔️ test_properties
❌ test_setter
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_setter>
✔️ test_variable
tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests
❌ test_array
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_basic
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_class_constrained
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_code_in_description
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_constrained_by_constructor
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_constrained_by_interface
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_constrained_by_key
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_constrained_by_property
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_destructured
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_generic_function
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_generic_member
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_interface_readonly_member
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_intersection
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_literal_types
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_named_interface
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_optional_property
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_unions
cls = <class 'test_typedoc_analysis.TypeNameTests'>
❌ test_utility_types
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Annotations
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.ConvertNodeTests ► test_function
Failed test found in:
test-results.xml
Error:
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_function>
Raw output
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_function>
def test_function(self):
"""Make sure Functions, Params, and Returns are built properly for
top-level functions.
This covers a few simple function typing cases as well.
"""
func = self.analyzer.get_object(["func"])
assert isinstance(func, Function)
> assert func.params == [
Param(
name="a",
description="Some number",
has_default=True,
is_variadic=False,
type=["number"],
default="1",
),
Param(
name="b",
description="Some strings",
has_default=False,
is_variadic=True,
type=["string", "[]"],
),
]
E AssertionError: assert [Param(name='...fault value>)] == [Param(name='...fault value>)]
E At index 0 diff: Param(name='a', description='Some number', has_default=True, is_variadic=False, type=['n', 'u', 'm', 'b', 'e', 'r'], default='1') != Param(name='a', description='Some number', has_default=True, is_variadic=False, type=['number'], default='1')
E Full diff:
E [
E Param(name='a',
E description='Some number',
E has_default=True,
E is_variadic=False,
E - type=['number'],
E + type=['n', 'u', 'm', 'b', 'e', 'r'],
E default='1'),
E Param(name='b',
E description='Some strings',
E has_default=False,
E is_variadic=True,
E - type=['string', '[]'],
E + type=['s', 't', 'r', 'i', 'n', 'g', '[]'],
E default=<no default value>),
E ]
tests/test_typedoc_analysis/test_typedoc_analysis.py:326: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.ConvertNodeTests ► test_getter
Failed test found in:
test-results.xml
Error:
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_getter>
Raw output
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_getter>
def test_getter(self):
"""Test that we represent getters as Attributes and find their return
types."""
getter = self.analyzer.get_object(["gettable"])
assert isinstance(getter, Attribute)
> assert getter.type == ["number"]
E AssertionError: assert ['n', 'u', 'm', 'b', 'e', 'r'] == ['number']
E At index 0 diff: 'n' != 'number'
E Left contains 5 more items, first extra item: 'u'
E Full diff:
E - ['number']
E + ['n', 'u', 'm', 'b', 'e', 'r']
tests/test_typedoc_analysis/test_typedoc_analysis.py:399: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.ConvertNodeTests ► test_setter
Failed test found in:
test-results.xml
Error:
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_setter>
Raw output
self = <test_typedoc_analysis.ConvertNodeTests testMethod=test_setter>
def test_setter(self):
"""Test that we represent setters as Attributes and find the type of
their 1 param."""
setter = self.analyzer.get_object(["settable"])
assert isinstance(setter, Attribute)
> assert setter.type == ["string"]
E AssertionError: assert ['s', 't', 'r', 'i', 'n', 'g'] == ['string']
E At index 0 diff: 's' != 'string'
E Left contains 5 more items, first extra item: 't'
E Full diff:
E - ['string']
E + ['s', 't', 'r', 'i', 'n', 'g']
tests/test_typedoc_analysis/test_typedoc_analysis.py:406: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_array
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_basic
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_class_constrained
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_code_in_description
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_constrained_by_constructor
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_constrained_by_interface
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_constrained_by_key
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError
Check failure on line 0 in test-results.xml
github-actions / Test report - Python 3.10 + typedoc 0.21
pytest ► tests.test_typedoc_analysis.test_typedoc_analysis.TypeNameTests ► test_constrained_by_property
Failed test found in:
test-results.xml
Error:
cls = <class 'test_typedoc_analysis.TypeNameTests'>
Raw output
cls = <class 'test_typedoc_analysis.TypeNameTests'>
@classmethod
def setup_class(cls):
"""Run the TS analyzer over the TypeDoc output."""
super().setup_class()
> cls.analyzer = TsAnalyzer(cls.json, cls._source_dir)
tests/testing.py:97:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sphinx_js/typedoc.py:238: in __init__
ir_objects = converter.convert_all_nodes(json)
sphinx_js/typedoc.py:222: in convert_all_nodes
converted, more_todo = node.to_ir(self)
sphinx_js/typedoc.py:460: in to_ir
return callable_to_ir(self, converter)
sphinx_js/typedoc.py:443: in callable_to_ir
return first_sig.to_ir(converter)
sphinx_js/typedoc.py:892: in to_ir
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:892: in <listcomp>
params=[p.to_ir(converter) for p in params],
sphinx_js/typedoc.py:772: in to_ir
type=self.type.render_name(converter),
sphinx_js/typedoc.py:927: in render_name
return list(self._render_name(converter))
sphinx_js/typedoc.py:930: in _render_name
yield from self._render_name_root(converter)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = ReferenceType(children=[], path=[], id=88, kindString='', originalName=None, sources=[], filename='', flags=Flags(isAb...False, isStatic=False), typeArguments=[], type='reference', name='Interface', target=None, refersToTypeParameter=False)
converter = <sphinx_js.typedoc.Converter object at 0x7fdc8285bc40>
def _render_name_root(self, converter: Converter) -> Iterator[str | ir.TypeXRef]:
if self.refersToTypeParameter:
yield self.name
return
if isinstance(self.target, int) and self.target > 0:
node = converter.index[self.target]
yield ir.TypeXRefInternal(self.name, node.path)
return
> assert isinstance(self.target, Target)
E AssertionError
sphinx_js/typedoc.py:1011: AssertionError