<commit_before># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from os.path import dirname, abspath
import sys
import unittest

from pykit.utils.pattern import match as pyoverload

from .entrypoints import jit, ijit, sjit, abstract
from .compiler import (annotate, overload, overloadable)
from .typing import (overlay, parse, unify, free, UnificationError)
from .rules import typeof, convert, promote, typejoin, is_numba_type
from .types import *
from .conversion import toobject, fromobject, toctypes, fromctypes, ctype
from .runtime import cast, NULL
from .runtime.interfaces.interface import implements
from .runtime.ffi import sizeof, malloc
from .runtime import builtins as bltins
from .runtime.obj.librt import debug
from .runtime.special import addressof

from .passes import translate
from .errors import error, InferError, SpecializeError

__version__ = '0.1'

# ______________________________________________________________________
# numba.test()

root = dirname(dirname(abspath(__file__)))
pattern = "test_*.py"

def test(root=root, pattern=pattern):
    """Run tests and return exit status"""
    tests =  unittest.TestLoader().discover(root, pattern=pattern)
    runner = unittest.TextTestRunner(verbosity=1 + ('-v' in sys.argv))
    result = runner.run(tests)
    return not result.wasSuccessful()
<commit_msg>Make sure math functions are available on import of numba<commit_after># -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from os.path import dirname, abspath
import sys
import unittest

from pykit.utils.pattern import match as pyoverload

from .entrypoints import jit, ijit, sjit, abstract
from .compiler import (annotate, overload, overloadable)
from .typing import (overlay, parse, unify, free, UnificationError)
from .rules import typeof, convert, promote, typejoin, is_numba_type
from .types import *
from .conversion import toobject, fromobject, toctypes, fromctypes, ctype
from .runtime import cast, NULL
from .runtime.interfaces.interface import implements
from .runtime.ffi import sizeof, malloc
from .runtime import builtins as bltins
from .runtime.obj.librt import debug
from .runtime.special import addressof
from .runtime import mathlib

from .passes import translate
from .errors import error, InferError, SpecializeError

__version__ = '0.1'

# ______________________________________________________________________
# numba.test()

root = dirname(dirname(abspath(__file__)))
pattern = "test_*.py"

def test(root=root, pattern=pattern):
    """Run tests and return exit status"""
    tests =  unittest.TestLoader().discover(root, pattern=pattern)
    runner = unittest.TextTestRunner(verbosity=1 + ('-v' in sys.argv))
    result = runner.run(tests)
    return not result.wasSuccessful()

{'fraction_non_alphanumeric': 0.08948306595365418, 'fraction_numerical': 0.00285204991087344, 'mean_word_length': 5.450574712643678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '722134', 'n_tokens_mistral': 792, 'n_tokens_neox': 789, 'n_words': 275}