Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
/pakfire-builder
/pakfire-client
/pakfire-daemon
-/src/pakfire/__version__.py
/src/systemd/*.service
/tests/.root
/tests/libpakfire/arch
};
PyMODINIT_FUNC PyInit_pakfire(void) {
+ int r;
+
// Create the module
PyObject* module = PyModule_Create(&moduledef);
if (!module)
return NULL;
+ // Add the version
+ r = PyModule_AddStringConstant(module, "__version__", PACKAGE_VERSION);
+ if (r < 0)
+ goto ERROR;
+
PyExc_BadSignatureError = PyErr_NewException("pakfire.BadSignatureError", NULL, NULL);
Py_INCREF(PyExc_BadSignatureError);
PyModule_AddObject(module, "BadSignatureError", PyExc_BadSignatureError);
"""
This tests the pakfire context
"""
+ def test_version(self):
+ self.assertIsInstance(pakfire.__version__, str)
+
def test_create(self):
"""
Create a context without any further ado