'Make sure that bitwise float operations are not allowed'

def test_bitwise_float(self):

    def assert_reject_compile(pyfunc, argtypes, opname):
        msg = 'expecting    TypingError    when    compiling    {}'.format(pyfunc)
        with self.assertRaises(errors.TypingError, msg=msg) as raises:
            compile_isolated(pyfunc, argtypes)
        fmt = 'Invalid    usage    of    {}'
        expecting = fmt.format((opname if isinstance(opname, str) else 'Function({})'.format(opname)))
        self.assertIn(expecting, str(raises.exception))
    methods = ['bitshift_left_usecase', 'bitshift_ileft_usecase', 'bitshift_right_usecase', 'bitshift_iright_usecase', 'bitwise_and_usecase', 'bitwise_iand_usecase', 'bitwise_or_usecase', 'bitwise_ior_usecase', 'bitwise_xor_usecase', 'bitwise_ixor_usecase', 'bitwise_not_usecase_binary']
    for name in methods:
        pyfunc = getattr(self.op, name)
        assert_reject_compile(pyfunc, (types.float32, types.float32), opname=self._bitwise_opnames[name])
