<commit_before>"""
@brief      test log(time=8s)
@author     <NAME>
"""

import sys
import os
import unittest


try:
    import src
except ImportError:
    path = os.path.normpath(
        os.path.abspath(
            os.path.join(
                os.path.split(__file__)[0],
                "..",
                "..")))
    if path not in sys.path:
        sys.path.append(path)
    import src

from src.pyquickhelper.loghelper.flog import fLOG, run_cmd
from src.pyquickhelper.helpgen.process_notebooks import get_ipython_program, get_jupyter_convert_program
from src.pyquickhelper.pycode.ci_helper import is_travis_or_appveyor


class TestGetProgram(unittest.TestCase):

    def test_get_ipython(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        if is_travis_or_appveyor() == "travis":
            return
        exe = get_ipython_program()
        cmd = exe + " help"
        out, err = run_cmd(cmd, wait=True)
        # fLOG(out)
        assert "DEPRECATED" in out

    def test_get_jupyter_convert(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        if is_travis_or_appveyor():
            return
        exe = get_jupyter_convert_program()
        cmd = exe + " --help"
        out, err = run_cmd(cmd, wait=True)
        fLOG(out)
        assert "--output=" in out

if __name__ == "__main__":
    unittest.main()
<commit_msg>disable unit test on appveyor<commit_after>"""
@brief      test log(time=8s)
@author     <NAME>
"""

import sys
import os
import unittest


try:
    import src
except ImportError:
    path = os.path.normpath(
        os.path.abspath(
            os.path.join(
                os.path.split(__file__)[0],
                "..",
                "..")))
    if path not in sys.path:
        sys.path.append(path)
    import src

from src.pyquickhelper.loghelper.flog import fLOG, run_cmd
from src.pyquickhelper.helpgen.process_notebooks import get_ipython_program, get_jupyter_convert_program
from src.pyquickhelper.pycode.ci_helper import is_travis_or_appveyor


class TestGetProgram(unittest.TestCase):

    def test_get_ipython(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        if is_travis_or_appveyor():
            # it also checks pandoc
            return
        exe = get_ipython_program()
        cmd = exe + " help"
        out, err = run_cmd(cmd, wait=True)
        # fLOG(out)
        assert "DEPRECATED" in out

    def test_get_jupyter_convert(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        if is_travis_or_appveyor():
            return
        exe = get_jupyter_convert_program()
        cmd = exe + " --help"
        out, err = run_cmd(cmd, wait=True)
        fLOG(out)
        assert "--output=" in out

if __name__ == "__main__":
    unittest.main()

{'fraction_non_alphanumeric': 0.09914361001317523, 'fraction_numerical': 0.0013175230566534915, 'mean_word_length': 2.0863821138211383, 'pattern_counts': {'":': 3, '<': 5, '<?xml version=': 0, '>': 5, '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': '6426582', 'n_tokens_mistral': 1006, 'n_tokens_neox': 992, 'n_words': 205}