def empty_context(input_file, fragment_dir, package_manager): return Context(base_dir=input_file.parent, fragment_dir=fragment_dir, reference=ApiReference(), package_manager=package_manager, current_document=DocumentTreeNode(input_file), current_package=Package(PackageManager.INPUT_FILES))
def empty_context(input_file, build_dir, fragment_dir): return Context(base_dir=input_file.parent, build_dir=build_dir, fragment_dir=fragment_dir, reference=ApiReference(), current_document=DocumentTreeNode(input_file))
def test_transcode__not_supported(): compound = make_compound(language="java", name="Coordinate") with pytest.raises(TranscoderError): TranscoderBase.transcode(compound, "cpp", ApiReference())
def test_transcode__compound(): compound = make_compound(language="java", name="Coordinate") transcoded = TranscoderBase.transcode(compound, "kotlin", ApiReference()) assert transcoded.language == "kotlin"
def test_transcode__load_and_detect_transcoders(): instance = TranscoderBase.instance("java", "kotlin", ApiReference()) assert instance is not None assert isinstance(instance, KotlinTranscoder)
def transcoder(): return _TestTranscoder(ApiReference())
def transcoder(): return SwiftTranscoder(ApiReference())