def test_numpy_validators_loaded_if_numpy_present(self):
        # If 'numpy' is available, the numpy validators should be loaded.

        # Make sure that numpy is present on this machine.
        try:
            import numpy
        except __HOLE__:
            self.skipTest("numpy library not found.")

        # Remove numpy from the list of imported modules.
        import sys
        del sys.modules['numpy']
        for k in list(sys.modules):
            if k.startswith('numpy.'):
                del sys.modules[k]

        # Check that the validators contain the numpy types.
        from traits.trait_types import float_fast_validate
        import numpy
        self.assertIn(numpy.floating, float_fast_validate)


# Run the unit tests (if invoked from the command line):
dataset/ETHPy150Open enthought/traits/traits/tests/test_trait_types.py/TraitTypesTest.test_numpy_validators_loaded_if_numpy_present