build/tests/test_testmanifest.txt
author Ryan VanderMeulen <ryanvm@gmail.com>
Sat, 11 Feb 2012 03:34:00 -0500
changeset 86670 2acd68334b0b9234a76a61ab61d7c595623ba2af
parent 71971 4edf5956780be0ab7bc2268adea9c87034c265e7
permissions -rw-r--r--
Bug 698519 - Update libjpeg-turbo to version 1.2.0. r=jlebar

Test the Test Manifest
======================

Boilerplate::

    >>> import os

Test filtering based on platform::

    >>> from manifestparser import TestManifest
    >>> manifest = TestManifest(manifests=('filter-example.ini',))
    >>> [i['name'] for i in manifest.active_tests(os='win', disabled=False, exists=False)]
    ['windowstest', 'fleem']
    >>> [i['name'] for i in manifest.active_tests(os='linux', disabled=False, exists=False)]
    ['fleem', 'linuxtest']

Look for existing tests.  There is only one::

    >>> [i['name'] for i in manifest.active_tests()]
    ['fleem']

You should be able to expect failures::

    >>> last_test = manifest.active_tests(exists=False, toolkit='gtk2')[-1]
    >>> last_test['name']
    'linuxtest'
    >>> last_test['expected']
    'pass'
    >>> last_test = manifest.active_tests(exists=False, toolkit='cocoa')[-1]
    >>> last_test['expected']
    'fail'