Exemple #1
0
def run(full=False):
    """
    Run the test scripts for QuTiP.

    Parameters
    ----------
    full: bool
        If True run all test (30 min). Otherwise skip few variants of the
        slowest tests.
    """
    # Call about to get all version info printed with tests
    about()
    import pytest
    real_num_cpu = qset.num_cpus
    real_thresh = qset.openmp_thresh
    if qset.has_openmp:
        # For travis which VMs have only 1 cpu.
        # Make sure the openmp version of the functions are tested.
        qset.num_cpus = 2
        qset.openmp_thresh = 100

    test_options = ["--verbosity=1", "--disable-pytest-warnings", "--pyargs"]
    if not full:
        test_options += ['-m', 'not slow']
    pytest.main(test_options + ["qutip"])
    # runs tests in qutip.tests module only

    # Restore previous settings
    if qset.has_openmp:
        qset.num_cpus = real_num_cpu
        qset.openmp_thresh = real_thresh
Exemple #2
0
def run():
    """
    Run the nose test scripts for QuTiP.
    """
    # Call about to get all version info printed with tests
    about()
    import nose
    # runs tests in qutip.tests module only
    nose.run(defaultTest="qutip.tests", argv=['nosetests', '-v'])
def run():
    """
    Run the nose test scripts for QuTiP.
    """
    # Call about to get all version info printed with tests
    about()
    import nose
    # runs tests in qutip.tests module only
    nose.run(defaultTest="qutip.tests", argv=['nosetests', '-v'])
Exemple #4
0
def run():
    """
    Run the test scripts for QuTiP.
    """
    # Call about to get all version info printed with tests
    about()
    import pytest
    real_num_cpu = qset.num_cpus
    real_thresh = qset.openmp_thresh
    if qset.has_openmp:
        # For travis which VMs have only 1 cpu.
        # Make sure the openmp version of the functions are tested.
        qset.num_cpus = 2
        qset.openmp_thresh = 100

    pytest.main(
        ["--verbosity=1", "--disable-pytest-warnings", "--pyargs", "qutip"])

    # Restore previous settings
    if qset.has_openmp:
        qset.num_cpus = real_num_cpu
        qset.openmp_thresh = real_thresh
Exemple #5
0
def run():
    """
    Run the nose test scripts for QuTiP.
    """
    # Call about to get all version info printed with tests
    about()
    import pytest
    # runs tests in qutip.tests module only
    pytest.main(
        ["--verbosity=1", "--disable-pytest-warnings", "--pyargs", "qutip"])
    real_num_cpu = qset.num_cpus
    real_thresh = qset.openmp_thresh
    if qset.has_openmp:
        # For travis which VMs have only 1 cpu.
        # Make sure the openmp version of the functions are tested.
        qset.num_cpus = 2
        qset.openmp_thresh = 100
    import nose
    # runs tests in qutip.tests module only
    nose.run(defaultTest="qutip.tests", argv=['nosetests', '-v'])

    if qset.has_openmp:
        qset.num_cpus = real_num_cpu
        qset.openmp_thresh = real_thresh
Exemple #6
0
'''
Created on Apr 30, 2019

@author: leonardo
'''

import qutip.testing as qt
from qutip.about import about

# Checking Version Information using the About Function
about()

#collection of built-in test scripts to verify that an installation was successful
qt.run()