<commit_before>import pytest

from treeherder.model.error_summary import (get_crash_signature,
                                            get_error_search_term)

PIPE_DELIMITED_LINE_TEST_CASES = (
    (
        (
            '596 INFO TEST-UNEXPECTED-FAIL '
            '| chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_fxa_login.js '
            '| Check settings tab URL - Got http://mochi.test:8888/browser/browser/components/loop/test/mochitest/loop_fxa.sjs'
        ),
        'browser_fxa_login.js'
    ),
    (
        (
            'REFTEST TEST-UNEXPECTED-FAIL '
            '| file:///C:/slave/test/build/tests/reftest/tests/layout/reftests/layers/component-alpha-exit-1.html '
            '| image comparison (==), max difference: 255, number of differing pixels: 251'
        ),
        'component-alpha-exit-1.html'
    ),
    (
        (
            '2423 INFO TEST-UNEXPECTED-FAIL '
            '| /tests/dom/media/tests/mochitest/test_dataChannel_basicAudio.html '
            '| undefined assertion name - Result logged after SimpleTest.finish()'
        ),
        'test_dataChannel_basicAudio.html'
    ),
    (
        (
            "TEST-UNEXPECTED-FAIL "
            "| mainthreadio "
            "| File 'c:\users\cltbld~1.t-w' was accessed and we were not expecting it: {'Count': 6, 'Duration': 0.112512, 'RunCount': 6}"
        ),
        'mainthreadio'
    ),
    (
        (
            "REFTEST PROCESS-CRASH "
            "| http://10.0.2.2:8854/tests/dom/canvas/test/reftest/webgl-resize-test.html == "
            "http://10.0.2.2:8854/tests/dom/canvas/test/reftest/wrapper.html?green.png "
            "| application crashed [@ jemalloc_crash]"
        ),
        'webgl-resize-test.html'<commit_msg>Bug 1428045 - Mark string as raw<commit_after>import pytest

from treeherder.model.error_summary import (get_crash_signature,
                                            get_error_search_term)

PIPE_DELIMITED_LINE_TEST_CASES = (
    (
        (
            '596 INFO TEST-UNEXPECTED-FAIL '
            '| chrome://mochitests/content/browser/browser/components/loop/test/mochitest/browser_fxa_login.js '
            '| Check settings tab URL - Got http://mochi.test:8888/browser/browser/components/loop/test/mochitest/loop_fxa.sjs'
        ),
        'browser_fxa_login.js'
    ),
    (
        (
            'REFTEST TEST-UNEXPECTED-FAIL '
            '| file:///C:/slave/test/build/tests/reftest/tests/layout/reftests/layers/component-alpha-exit-1.html '
            '| image comparison (==), max difference: 255, number of differing pixels: 251'
        ),
        'component-alpha-exit-1.html'
    ),
    (
        (
            '2423 INFO TEST-UNEXPECTED-FAIL '
            '| /tests/dom/media/tests/mochitest/test_dataChannel_basicAudio.html '
            '| undefined assertion name - Result logged after SimpleTest.finish()'
        ),
        'test_dataChannel_basicAudio.html'
    ),
    (
        (
            r"TEST-UNEXPECTED-FAIL "
            r"| mainthreadio "
            r"| File 'c:\users\cltbld~1.t-w' was accessed and we were not expecting it: {'Count': 6, 'Duration': 0.112512, 'RunCount': 6}"
        ),
        'mainthreadio'
    ),
    (
        (
            "REFTEST PROCESS-CRASH "
            "| http://10.0.2.2:8854/tests/dom/canvas/test/reftest/webgl-resize-test.html == "
            "http://10.0.2.2:8854/tests/dom/canvas/test/reftest/wrapper.html?green.png "
            "| application crashed [@ jemalloc_crash]"
        ),
        'webgl-resize-test.html'
{'fraction_non_alphanumeric': 0.1306179775280899, 'fraction_numerical': 0.028370786516853933, 'mean_word_length': 1.885737439222042, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2956520', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1149, 'n_words': 150}