• Kirill Smelkov's avatar
    golang: tests: Adjust golang_test_defer_excchain.txt-pytest golden to support Windows · ee55e19d
    Kirill Smelkov authored
    Apparently on Windows pytest detects terminal width differently than on
    Linux/macOS and the test fails as
    
        E           Failed: not equal:
        E           Differences (unified diff with -expected +actual):
        E               @@ -1,5 +1,12 @@
        E               -...
        E               -_____________________________________ main _____________________________________
        E               -../__init__.py:...: in _
        E               +============================= test session starts =============================
        E               +platform win32 -- Python 3.10.11, pytest-7.3.1, pluggy-1.0.0
        E               +rootdir: PYGOLANG
        E               +collected 1 item
        E               +<BLANKLINE>
        E               +golang_test_defer_excchain.py F                                          [100%]
        E               +<BLANKLINE>
        E               +================================== FAILURES ===================================
        E               +____________________________________ main _____________________________________
        E               +../__init__.py:106: in _
        E                    return f(*argv, **kw)
        E                golang_test_defer_excchain.py:42: in main
        E               @@ -8,6 +15,6 @@
        E                <BLANKLINE>
        E                During handling of the above exception, another exception occurred:
        E               -../__init__.py:...: in __exit__
        E               -    ...
        E               +../__init__.py:183: in __exit__
        E               +    d()
        E                golang_test_defer_excchain.py:31: in d1
        E                    raise RuntimeError("d1: aaa")
        E               @@ -15,9 +22,9 @@
        E                <BLANKLINE>
        E                During handling of the above exception, another exception occurred:
        E               -../__init__.py:...: in __exit__
        E               -    ...
        E               +../__init__.py:183: in __exit__
        E               +    d()
        E                golang_test_defer_excchain.py:33: in d2
        E                    1/0
        E               -E   ZeroDivisionError: ...
        E               +E   ZeroDivisionError: division by zero
        E                <BLANKLINE>
        E                During handling of the above exception, another exception occurred:
        E               @@ -25,3 +32,5 @@
        E                    raise RuntimeError("d3: bbb")
        E                E   RuntimeError: d3: bbb
        E               -=========================== ...
        E               +=========================== short test summary info ===========================
        E               +FAILED golang_test_defer_excchain.py::main - RuntimeError: d3: bbb
        E               +============================== 1 failed in 1.45s ==============================
    
    -> Fix it by not requesting header to be of particular width.
    ee55e19d
golang_test_defer_excchain.txt-pytest 788 Bytes