<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/psutil.git/psutil/tests/test_linux.py, branch proc-namespace</title>
<subtitle>github.com: giampaolo/psutil.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/'/>
<entry>
<title>Process wait() improvements (#1747)</title>
<updated>2020-05-02T22:19:53+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-05-02T22:19:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=42368e6a786415d932cb48d0fd006a0c302ab31b'/>
<id>42368e6a786415d932cb48d0fd006a0c302ab31b</id>
<content type='text'>
* `Process.wait()` on POSIX now returns an `enum` showing the negative which was used to terminate the process:
```python
&gt;&gt;&gt; import psutil
&gt;&gt;&gt; p = psutil.Process(9891)
&gt;&gt;&gt; p.terminate()
&gt;&gt;&gt; p.wait()
&lt;Negsignal.SIGTERM: -15&gt;
```

* the return value is cached so that the exit code can be retrieved on then next call, mimicking `subprocess.Popen.wait()`
* `Process` object provides more `status` and `exitcode` additional info on `str()` and `repr()`:

```
 &gt;&gt;&gt; proc
 psutil.Process(pid=12739, name='python3', status='terminated', exitcode=&lt;Negsigs.SIGTERM: -15&gt;, started='15:08:20')
```

Extra:
* improved `wait()` doc
* reverted #1736: `psutil.Popen` uses original `subprocess.Popen.wait` method (safer)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* `Process.wait()` on POSIX now returns an `enum` showing the negative which was used to terminate the process:
```python
&gt;&gt;&gt; import psutil
&gt;&gt;&gt; p = psutil.Process(9891)
&gt;&gt;&gt; p.terminate()
&gt;&gt;&gt; p.wait()
&lt;Negsignal.SIGTERM: -15&gt;
```

* the return value is cached so that the exit code can be retrieved on then next call, mimicking `subprocess.Popen.wait()`
* `Process` object provides more `status` and `exitcode` additional info on `str()` and `repr()`:

```
 &gt;&gt;&gt; proc
 psutil.Process(pid=12739, name='python3', status='terminated', exitcode=&lt;Negsigs.SIGTERM: -15&gt;, started='15:08:20')
```

Extra:
* improved `wait()` doc
* reverted #1736: `psutil.Popen` uses original `subprocess.Popen.wait` method (safer)</pre>
</div>
</content>
</entry>
<entry>
<title>Per-test file cleanup and new PsutilTestCase (#1743)</title>
<updated>2020-04-30T21:45:08+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-30T21:45:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=3480e1b05f3e98744a1b6aa6fe286caac86e6bbd'/>
<id>3480e1b05f3e98744a1b6aa6fe286caac86e6bbd</id>
<content type='text'>
Test files/dirs are now removed after each test. when invoked via self.get_testfn().
Until now test files were stored in a global variable and were removed at process exit, via atexit.register(), but this didn't work with parallel tests because the fork()ed workers use os._exit(0), preventing cleanup functions to run.
All test classes now inherit from PsutilTestCase class, which provides the most important methods requiring an automatic cleanup (get_test_subprocess() and others).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test files/dirs are now removed after each test. when invoked via self.get_testfn().
Until now test files were stored in a global variable and were removed at process exit, via atexit.register(), but this didn't work with parallel tests because the fork()ed workers use os._exit(0), preventing cleanup functions to run.
All test classes now inherit from PsutilTestCase class, which provides the most important methods requiring an automatic cleanup (get_test_subprocess() and others).</pre>
</div>
</content>
</entry>
<entry>
<title>Test sub-processes cleanup and ProcessTestCase class (#1739)</title>
<updated>2020-04-28T19:06:38+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-28T19:06:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=0065a3921b1cf31ad32cca5bd3ca209fe1fbceed'/>
<id>0065a3921b1cf31ad32cca5bd3ca209fe1fbceed</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>psutil.Popen: inherit from subprocess + support wait(timeout=...) parameter (#1736)</title>
<updated>2020-04-28T01:32:46+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-28T01:32:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=92e150ef5e309ff93378ae4538065f1ca5c00a17'/>
<id>92e150ef5e309ff93378ae4538065f1ca5c00a17</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into dev</title>
<updated>2020-04-26T00:05:25+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-26T00:05:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=7cd0dd250fcb57874d81c954196bfba4bd3d406d'/>
<id>7cd0dd250fcb57874d81c954196bfba4bd3d406d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>rename var</title>
<updated>2020-04-26T00:05:14+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-26T00:05:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=6e2aa0d80f5c8301c27551f65181ffc7e2cb5d8c'/>
<id>6e2aa0d80f5c8301c27551f65181ffc7e2cb5d8c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Parallel tests (UNIX) (#1709)</title>
<updated>2020-04-26T00:02:43+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-26T00:02:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=420c9e82fd3321e3062424846870f3104c1b0eb8'/>
<id>420c9e82fd3321e3062424846870f3104c1b0eb8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Get rid of TESTFN global variable (#1734)</title>
<updated>2020-04-24T21:56:57+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-24T21:56:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=bc899c3f24581aa122e1b5b18ea6e694c2faddce'/>
<id>bc899c3f24581aa122e1b5b18ea6e694c2faddce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>point all shebangs to python 3</title>
<updated>2020-02-15T17:17:37+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-02-15T17:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=3424a1a6f8f91292eca6373ba0cd3fb5170c1648'/>
<id>3424a1a6f8f91292eca6373ba0cd3fb5170c1648</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>#1681, revert 00a3398</title>
<updated>2020-02-13T22:28:57+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-02-13T22:28:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/psutil.git/commit/?id=29846dab6fdb1d7a9e46fb644417217cedffd115'/>
<id>29846dab6fdb1d7a9e46fb644417217cedffd115</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
