summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox/files/test_python.py
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac@gentoo.org>2024-10-18 18:59:31 +0300
committerViorel Munteanu <ceamac@gentoo.org>2024-10-18 20:13:10 +0300
commit754efcbdcd799f8a8f71805b543c638e2759ad6b (patch)
tree84ae897e68a03df7d2b92bde935708b03b2666a1 /app-emulation/virtualbox/files/test_python.py
parentb588cce7ec1d8a6ef7575dc5ef5429486bfcb05b (diff)
downloadgentoo-754efcbdcd799f8a8f71805b543c638e2759ad6b.tar.gz
gentoo-754efcbdcd799f8a8f71805b543c638e2759ad6b.tar.bz2
gentoo-754efcbdcd799f8a8f71805b543c638e2759ad6b.zip
app-emulation/virtualbox: add 7.0.22
Bug: https://bugs.gentoo.org/929313 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation/virtualbox/files/test_python.py')
-rw-r--r--app-emulation/virtualbox/files/test_python.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/app-emulation/virtualbox/files/test_python.py b/app-emulation/virtualbox/files/test_python.py
new file mode 100644
index 000000000000..da03af795501
--- /dev/null
+++ b/app-emulation/virtualbox/files/test_python.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python3
+
+# Smoke test for python:
+# Test if the python bindings have been built and if python is crashing when creating a manager
+
+def test_module_was_built():
+ import os
+ assert os.path.isfile(os.getenv('VBOX_PROGRAM_PATH') + '/VBoxPython3.so')
+
+def test_VirtualBoxManager():
+ from vboxapi import VirtualBoxManager
+ try:
+ manager = VirtualBoxManager()
+ except:
+ # if it reaches here, it did not crash
+ pass