• Kirill Smelkov's avatar
    golang: tests: assertDoc: Include ~/... into PYGOLANG normalization · 42ab98a6
    Kirill Smelkov authored
    assertDoc normalizes paths in compared texts with the idea for etalon
    output to contain PYGOLANG instead of whatever actual path there will be
    when testing the package. This already works.
    
    However IPython, when dumping tracebacks, tries to shorten paths and
    abbreviate $HOME with ~ in them. This breaks normalization which misses
    to convert prefix of those paths into PYGOLANG.
    
    -> Fix it by teaching assertDoc to also handle paths that start with ~
    and correctly normalize them.
    
    This will be needed in the next patch where we will add tests for how
    ipython and pytest dump tracebacks for chained exceptions.
    42ab98a6
golang_test.py 49.4 KB