Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#8631 closed defect (fixed)

Integ tests rename process

Reported by: atagar Owned by: atagar
Priority: Medium Milestone:
Component: Archived/Stem Version:
Severity: Keywords: testing
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


While running stem's integ tests the process name, according to ps, becomes...

p   y   t   h   o   n       .   /   r   u   n   _   t   e   s

This is likely due to the integ test for process renaming (maybe it's failing to revert the activity it takes?).

Child Tickets

Change History (3)

comment:1 Changed 8 years ago by ragwater

Status: newneeds_review

get_process_name() seems to return uncooperative encoding in some cases

Quick hotfix:

comment:2 Changed 8 years ago by atagar

Resolution: fixed
Status: needs_reviewclosed

Very nice catch! The str_tools module has methods for unicode/bytes conversions to better support python3 compatibility but strangely it doesn't work in this case. The call I tried was...

process_name_encoded = stem.util.str_tools._to_unicode(process_name)

... which would functionally be the same as what you have, but with 'replace' (rather than bulking at characters it can't convert)...

process_name_encoded = process_name.encode('utf8', 'replace')

But it didn't work. Oh well, I ran your patch with both python2 and python3 and they're both happy now so pushed.

Thanks! -Damian

PS. Minor nitpick but git has a specific format it expects commit messages to have. There's no need to state the modified files (that's easily seen from the commit), but it does expect...

Short summary line

Description of stuff, preferably explaining the issue,
your fix, the ticket url, testing done, etc...

For instance I changed the commit message for this one to...

comment:3 Changed 8 years ago by ragwater

Live and learn, I'll make sure to follow those specs in the future :)


Note: See TracTickets for help on using tickets.