def test_strip_comment(self):
        lines = [(1, 'req1'), (2, 'req # comment'), (3, 'req2')]
        result = ignore_comments(lines)
        assert list(result) == [(1, 'req1'), (2, 'req'), (3, 'req2')]
dataset/ETHPy150Open pypa/pip/tests/unit/test_req_file.py/TestIgnoreComments.test_strip_comment/original