summaryrefslogtreecommitdiff
path: root/psutil/_psutil_common.h
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-05-17 20:28:09 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2017-05-17 20:28:09 +0200
commit3de7b673a08d3931beb03af28d471b984f411d23 (patch)
tree2220d3320686a0d817983b6c7f53ecf29ae1390f /psutil/_psutil_common.h
parentc630eff0991116c036723a80531e85d8d599e6c8 (diff)
downloadpsutil-testing-envvar.tar.gz
Introduce PSUTIL_TESTING env varpsutil-testing-envvar
...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
Diffstat (limited to 'psutil/_psutil_common.h')
-rw-r--r--psutil/_psutil_common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/psutil/_psutil_common.h b/psutil/_psutil_common.h
index aa634ad3..13404532 100644
--- a/psutil/_psutil_common.h
+++ b/psutil/_psutil_common.h
@@ -11,7 +11,9 @@ static const int PSUTIL_CONN_NONE = 128;
PyObject* AccessDenied(void);
PyObject* NoSuchProcess(void);
+int psutil_testing(void);
+PyObject* py_psutil_testing(PyObject *self, PyObject *args);
#if PY_MAJOR_VERSION < 3
PyObject* PyUnicode_DecodeFSDefault(char *s);
PyObject* PyUnicode_DecodeFSDefaultAndSize(char *s, Py_ssize_t size);
-#endif \ No newline at end of file
+#endif