diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-18 21:43:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 21:43:30 +0200 |
commit | cee414dca663bdac9712c0779e43ce0c184e904e (patch) | |
tree | 374be75e513991e9e963a1f024e7cc072c67c985 /psutil/_psutil_sunos.c | |
parent | d58c4338d64fad9b3c0eebb2451cd55f660e86cf (diff) | |
download | psutil-cee414dca663bdac9712c0779e43ce0c184e904e.tar.gz |
PSUTIL_TESTING env var (#1083)
* Introduce PSUTIL_TESTING env var
...so that we can make stricter assertions in C and py code during tests
only.
* define a C function in _common.c which returns whether the var is set
* set PSUTIL_TESTING from the Makefile
* cache psutil_testing() result
* winmake: set PSUTIL_TESTING env var for tests
Diffstat (limited to 'psutil/_psutil_sunos.c')
-rw-r--r-- | psutil/_psutil_sunos.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c index e3eb2560..785805d4 100644 --- a/psutil/_psutil_sunos.c +++ b/psutil/_psutil_sunos.c @@ -1470,7 +1470,6 @@ error: */ static PyMethodDef PsutilMethods[] = { - // --- process-related functions {"proc_basic_info", psutil_proc_basic_info, METH_VARARGS, "Return process ppid, rss, vms, ctime, nice, nthreads, status and tty"}, @@ -1513,6 +1512,10 @@ PsutilMethods[] = { {"cpu_stats", psutil_cpu_stats, METH_VARARGS, "Return CPU statistics"}, + // --- others + {"py_psutil_testing", py_psutil_testing, METH_VARARGS, + "Return True if PSUTIL_TESTING env var is set"}, + {NULL, NULL, 0, NULL} }; |