<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/psutil.git/psutil/tests/test_misc.py, branch pyobj-refact</title>
<subtitle>github.com: giampaolo/psutil.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/'/>
<entry>
<title>Remove Travis and Cirrus, use GH also for FreeBSD (#1880)</title>
<updated>2020-11-15T20:54:42+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-11-15T20:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=e58b0fdaeaedd73a0ca19ad23a63874708d86b91'/>
<id>e58b0fdaeaedd73a0ca19ad23a63874708d86b91</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite Linux prlimit() with ctypes (Linux wheels) (#1879)</title>
<updated>2020-11-14T23:27:05+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-11-14T23:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=8fc5ed1b20c9c9fab75164aae1984698a46974dc'/>
<id>8fc5ed1b20c9c9fab75164aae1984698a46974dc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix py 3.9 [WinError 998] Invalid access to memory location (#1866)</title>
<updated>2020-10-31T14:37:31+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-10-31T14:37:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=9aba2efe6cee0a343002d0453674aca68a7b7aec'/>
<id>9aba2efe6cee0a343002d0453674aca68a7b7aec</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>If the batery is not available set it to false (#1717)</title>
<updated>2020-08-13T14:00:19+00:00</updated>
<author>
<name>Tomáš Chvátal</name>
<email>tomas.chvatal@gmail.com</email>
</author>
<published>2020-08-13T14:00:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=ff088dc310f0cd24509ab4260888ef75da412ed3'/>
<id>ff088dc310f0cd24509ab4260888ef75da412ed3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Wheels 3 (#1764)</title>
<updated>2020-05-23T15:34:17+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-05-23T15:34:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=bb2c6cfb6aa83a8557051f3fd1d451bd419dfc04'/>
<id>bb2c6cfb6aa83a8557051f3fd1d451bd419dfc04</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix some tests</title>
<updated>2020-05-15T11:37:54+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-05-15T11:37:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=34d1006eb52b134e2f135430c1f25533ce62a00e'/>
<id>34d1006eb52b134e2f135430c1f25533ce62a00e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor tests calling all process methods (process_namespace class) (#1749)</title>
<updated>2020-05-04T17:22:33+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-05-04T17:22:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=42b2cd718a3caf813b4eccce13ac3629599cb017'/>
<id>42b2cd718a3caf813b4eccce13ac3629599cb017</id>
<content type='text'>
Over the years I have accumulated different unit-tests which use dir() to get all process methods and test them in different circumstances. This produced a lot of code duplication. With this PR I introduce 2 new test classes (process_namespace and system_namespace) which declare all the method names and arguments in a single place, removing a lot cruft and code duplication.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Over the years I have accumulated different unit-tests which use dir() to get all process methods and test them in different circumstances. This produced a lot of code duplication. With this PR I introduce 2 new test classes (process_namespace and system_namespace) which declare all the method names and arguments in a single place, removing a lot cruft and code duplication.</pre>
</div>
</content>
</entry>
<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://91.123.203.49/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://91.123.203.49/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>show status() in __repr__</title>
<updated>2020-04-28T02:27:56+00:00</updated>
<author>
<name>Giampaolo Rodola</name>
<email>g.rodola@gmail.com</email>
</author>
<published>2020-04-28T02:27:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/psutil.git/commit/?id=56db14e14797ac790094a7bd8865d63383fd93a7'/>
<id>56db14e14797ac790094a7bd8865d63383fd93a7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
