summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox-kvm/files/test_python.py
blob: da03af795501cf22fbf8969facb91c8fe1989e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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