pytest problems in unicode encoding (e.g. test_fix.py::Test1::test_s1[\u6d4b\u8bd5-\u6d4b\u8bd5])

phenomenon:

 

 Follows the correct manner can be displayed in Chinese

= R & lt SS " test_fix.py::Test1::test_s1[\u6d4b\u8bd5-\u6d4b\u8bd5] " 
Print (ss.encode ( " UTF-. 8 " ) .decode ( " unicode_escape " )) 

output: 
test_fix. py :: Test1 :: test_s1 [test - test]

Attached: unicode and utf8 relationship: https://www.cnblogs.com/liudi2017/articles/9418465.html

Guess you like

Origin www.cnblogs.com/wang-mengmeng/p/11461627.html