rtstubs/tests/test_analysis.py

38 lines
787 B
Python
Raw Permalink Normal View History

2023-05-16 02:35:45 +02:00
def test_analysis():
import sys
import clr
sys.path.append(r"C:\Program Files\HandBrake")
from rtstubs.rtstubs import analyze_ref, get_imports
analyze_ref("Newtonsoft.Json")
# refs = ["Newtonsoft.Json"]
# add_refs = []
# while refs:
# for r in refs:
# add_refs.extend(analyze_ref(r))
# refs = add_refs.copy()
# add_refs.clear
for i in get_imports():
logging.info(f"import {i}")
# clr.AddReference("Newtonsoft.Json")
# import Newtonsoft.Json as m
# from rtstubs.rtstubs import analyze_module
# analyze_module(m)
if __name__ == "__main__":
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger("rtstubs").setLevel(logging.DEBUG)
test_analysis()