import os.path
import unittest

POSSIBLE_TEST_BINARIES = [
    'libreadline.so.5',
    'libreadline.so.6',
]

POSSIBLE_TEST_BINARY_PATHS = [
    '/lib',
    '/usr/lib',
    '/usr/local/lib',
]

class TestBase(unittest.TestCase):
    def get_test_binary(self):
        """Helper to obtain a test binary for object file testing.

        FIXME Support additional, highly-likely targets or create one
        ourselves.
        """
        for d in POSSIBLE_TEST_BINARY_PATHS:
            for lib in POSSIBLE_TEST_BINARIES:
                path = os.path.join(d, lib)

                if os.path.exists(path):
                    return path

        raise Exception('No suitable test binaries available!')

import os.path
import unittest

POSSIBLE_TEST_BINARIES = [
    'libreadline.so.5',
    'libreadline.so.6',
]

POSSIBLE_TEST_BINARY_PATHS = [
    '/lib',
    '/usr/lib',
    '/usr/local/lib',
]

class TestBase(unittest.TestCase):
    def get_test_binary(self):
        """Helper to obtain a test binary for object file testing.

        FIXME Support additional, highly-likely targets or create one
        ourselves.
        """
        for d in POSSIBLE_TEST_BINARY_PATHS:
            for lib in POSSIBLE_TEST_BINARIES:
                path = os.path.join(d, lib)

                if os.path.exists(path):
                    return path

        raise Exception('No suitable test binaries available!')
    get_test_binary.__test__ = False

Mark get_test_binary as not being a test
[python] Mark get_test_binary as not being a test

get_test_binary is a helper method, not a test, make sure nosetests
doesn't pick it up as a test.



git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@153173 91177308-0d34-0410-b5e6-96231b3b80d8
