def test_lines(): """ Check that the replace matches what we expect. Things we must match: version="0.0.1" "version": "0.0.1", __version__ = "0.0.1" """ from robocorp_ls_core.unittest_tools.compare import compare_lines contents = _fix_contents_version( """ version="0.0.198" version = "0.0.1" "version": "0.0.1", "version":"0.0.1", "version" :"0.0.1", __version__ = "0.0.1" """, "3.7.1", ) expected = """ version="3.7.1" version = "3.7.1" "version": "3.7.1", "version":"3.7.1", "version" :"3.7.1", __version__ = "3.7.1" """ compare_lines(contents.splitlines(), expected.splitlines())
def test_lines(): """ Check that the replace matches what we expect. Things we must match: version="0.0.1" "version": "0.0.1", __version__ = "0.0.1" https://github.com/robocorp/robotframework-lsp/blob/robotframework-lsp-0.1.1/robotframework-ls/README.md """ from robocorp_ls_core.unittest_tools.compare import compare_lines contents = _fix_contents_version( """ version="0.0.198" version = "0.0.1" "version": "0.0.1", "version":"0.0.1", "version" :"0.0.1", __version__ = "0.0.1" https://github.com/robocorp/robotframework-lsp/blob/robotframework-lsp-0.1.1/robotframework-ls/README.md """, "3.7.1", ) expected = """ version="3.7.1" version = "3.7.1" "version": "3.7.1", "version":"3.7.1", "version" :"3.7.1", __version__ = "3.7.1" https://github.com/robocorp/robotframework-lsp/blob/robotframework-lsp-3.7.1/robotframework-ls/README.md """ compare_lines(contents.splitlines(), expected.splitlines())