• Kirill Smelkov's avatar
    golang_str: tests: Make test_strings_methods more robust with upcoming unicode=ustr · 302b51c5
    Kirill Smelkov authored
    Previously test_strings_methods was testing a method via comparing bstr
    and ustr results of .method() with similar result of unicode.method().
    This works reasonably ok. However under gpython, when unicode will be
    replaced with ustr, it will no longer compare results of bstr/ustr
    methods with something good and external - indeed in that case bstr/ustr
    .method() will be compared to result of ustr.method() which opens the
    door for bugs to stay unnoticed.
    
    -> Adjust the test to explicitly provide expected result for all entries
    in the test vector. We make sure those results are good and match std
    python because we also assert that unicode.method() matches it.
    302b51c5
golang_str_test.py 99.6 KB