CFMTech / pytest-monitor

Pytest plugin for analyzing resource usage during test sessions
MIT License
173 stars 16 forks source link

unicode issue in determine_scm_revision with Perforce #54

Closed jdhalimi closed 2 years ago

jdhalimi commented 2 years ago

Describe the bug

with Perforce source control

To Reproduce Steps to reproduce the behavior:

  1. use Perforce SCM
  2. put an accent / non ASCII character in commit message
  3. run pytest using pytest monitor

Expected behavior ignore commit message retrieving commit message

Stack trace

INTERNALERROR>   File "/xxxxxxxxxxxxxxxxxxxxx/lib/python3.6/site-packages/pytest_monitor/sys_utils.py", line 42, in determine_scm_revision
INTERNALERROR>     return p_out.decode().split('\n')[0]
INTERNALERROR> UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 78: invalid continuation byte

Desktop (please complete the following information):