golang: tests: assertDoc: Include ~/... into PYGOLANG normalization
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.
Showing
Please register or sign in to comment