43d9234b78a73840c41ab6f0da83960da84c5d14,app/api/tests/test_utils.py,TestCoNLLParser,test_calc_char_offset,#TestCoNLLParser#,145

Before Change


    def test_calc_char_offset(self):
        f = io.BytesIO()

        s = [
            ("EU", "ORG"), ("rejects", "_"), ("German", "MISC"), ("call", "_")
        ]
        for w, t in s:
            f.write("{}\t{}\n".format(w, t).encode())
        f.seek(0)

        actual = next(CoNLLParser().parse(f))[0]

After Change


class TestCoNLLParser(TestCase):
    def test_calc_char_offset(self):
        f = io.BytesIO(
          b"EU\tORG\n"
          b"rejects\t_\n"
          b"German\tMISC\n"
          b"call\t_\n"
        )

        actual = next(CoNLLParser().parse(f))[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chakki-works/doccano
Commit Name: 43d9234b78a73840c41ab6f0da83960da84c5d14
Time: 2019-08-07
Author: null
File Name: app/api/tests/test_utils.py
Class Name: TestCoNLLParser
Method Name: test_calc_char_offset


Project Name: dask/distributed
Commit Name: 383ea0326ae103b5d5e0b62ed9c3cb18510c5b9e
Time: 2021-02-17
Author: jakirkham@gmail.com
File Name: distributed/comm/tcp.py
Class Name: TCP
Method Name: write


Project Name: pantsbuild/pants
Commit Name: 791be481c4a0102042dc0a502b08ba5cc6a85987
Time: 2020-06-29
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/inject_init_test.py
Class Name: InjectInitTest
Method Name: assert_injected