<commit_before># -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from __future__ import print_function, division, unicode_literals, absolute_import

import os
from distutils.version import LooseVersion

from .info import (LONG_DESCRIPTION as __doc__,
                   URL as __url__,
                   STATUS as __status__,
                   __version__)
from .utils.config import NipypeConfig
from .fixes.numpy.testing import nosetester
from .utils.logger import Logging
from .refs import due

try:
    import faulthandler
    faulthandler.enable()
except (ImportError, IOError) as e:
    pass

config = NipypeConfig()
logging = Logging(config)


class _NoseTester(nosetester.NoseTester):
    """ Subclass numpy's NoseTester to add doctests by default
    """

    def _get_custom_doctester(self):
        return None

    def test(self, label='fast', verbose=1, extra_argv=['--exe'],
             doctests=True, coverage=False):
        """Run the full test suite

        Examples
        --------
        This will run the test suite and stop at the first failing
        example
        >>> from nipype import test
        >>> test(extra_argv=['--exe', '-sx'])  # doctest: +SKIP
        """
        return super(_NoseTester, self).test(label=label,
                                             verbose=verbose,
                                             extra_argv=extra_argv,
                                             doctests=doctests,
                                             coverage=coverage)

try:
    test = _NoseTester(raise_warnings="release").test
except TypeError:
    # Older versions of numpy do not have a raise_warnings argument
    test = _NoseTester().test
del nosetester

# Set up package information function
from .pkg_info import get_pkg_info as _get_pkg_info
get_info = lambda: _get_pkg_info(os.path.dirname(__file__))

# If this file is exec after being imported, the following lines will
# fail
try:
    del Tester
except:
    pass<commit_msg>Removing nosetest from nipype/__init__.py; pytest version is missing for now<commit_after># -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
from __future__ import print_function, division, unicode_literals, absolute_import

import os
from distutils.version import LooseVersion

from .info import (LONG_DESCRIPTION as __doc__,
                   URL as __url__,
                   STATUS as __status__,
                   __version__)
from .utils.config import NipypeConfig
from .utils.logger import Logging
from .refs import due

try:
    import faulthandler
    faulthandler.enable()
except (ImportError, IOError) as e:
    pass

config = NipypeConfig()
logging = Logging(config)

#NOTE_dj: it has to be changed to python
#class _NoseTester(nosetester.NoseTester):
#    """ Subclass numpy's NoseTester to add doctests by default
#    """

#    def _get_custom_doctester(self):
#        return None

#    def test(self, label='fast', verbose=1, extra_argv=['--exe'],
#             doctests=True, coverage=False):
#        """Run the full test suite
#
#        Examples
#        --------
#        This will run the test suite and stop at the first failing
#        example
#        >>> from nipype import test
#        >>> test(extra_argv=['--exe', '-sx'])  # doctest: +SKIP
#        """
#        return super(_NoseTester, self).test(label=label,
#                                             verbose=verbose,
#                                             extra_argv=extra_argv,
#                                             doctests=doctests,
#                                             coverage=coverage)

#try:
#    test = _NoseTester(raise_warnings="release").test
#except TypeError:
    # Older versions of numpy do not have a raise_warnings argument
#    test = _NoseTester().test
#del nosetester

# Set up package information function
#from .pkg_info import get_pkg_info as _get_pkg_info
#get_info = lambda: _get_pkg_info(os.path.dirname(__file__))

# If this file is exec after being imported, the following lines will
# fail
#try:
#    del Tester
#except:
#    pass
{'fraction_non_alphanumeric': 0.09445100354191263, 'fraction_numerical': 0.002833530106257379, 'mean_word_length': 2.3042121684867394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7442636', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1198, 'n_words': 370}