typedef-printers.py (396B)
1 # Test that we can find pretty-printers for typedef names, not just for 2 # struct types and templates. 3 # flake8: noqa: F821 4 5 import mozilla.prettyprinters 6 7 8 @mozilla.prettyprinters.pretty_printer("my_typedef") 9 class my_typedef: 10 def __init__(self, value, cache): 11 pass 12 13 def to_string(self): 14 return "huzzah" 15 16 17 run_fragment("typedef_printers.one") 18 assert_pretty("i", "huzzah")