mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 23:45:44 +07:00
![]() - Apparently if a user is on windows the ACE editor can swap out their line end from unix to windows. The patch parsers were predicated upon all patches being in unix mode (because git, and diff). Fixup both parsers to convert windows-style line end to unix before trying to parse the patch data. Also add a few fallbacks to limit the odds of an unhelpful `StopIteration` (though that might hide errors more than reveal them...) - Make sure we support `format-patch --no-signature`, just requires using the correct partition direction: I assume I used `rpartition` as a form of micro-optimisation *but* - If the separator is not found the "patch body" ends up in the third parameter rather than the first, which makes the fallback difficult. - There doesn't seem to be anything preventing *multiple* signature separators in a message, and logically the first one should hold and the rest is all part of the signature. As a result, for both reasons we need to look *forwards* for the signature separator, not backwards. Hence `str.partition`. Fixes #992 |
||
---|---|---|
.. | ||
conftest.py | ||
README.rst | ||
test_basic.py | ||
test_batch_consistency.py | ||
test_by_branch.py | ||
test_dfm.py | ||
test_disabled_branch.py | ||
test_multirepo.py | ||
test_oddities.py | ||
test_patching.py | ||
test_project_toggles.py | ||
test_provisioning.py | ||
test_staging.py | ||
test_status_overrides.py |
Execute this test suite using pytest. The default mode is to run tests locally using a mock github.com. See the docstring of remote.py for instructions to run against github "actual" (including remote-specific options) and the end of this file for a sample. Shared properties running tests, regardless of the github implementation: * test should be run from the root of the runbot repository providing the name of this module aka ``pytest runbot_merge`` or ``python -mpytest runbot_merge`` * a database name to use must be provided using ``--db``, the database should not exist beforehand * the addons path must be specified using ``--addons-path``, both "runbot" and the standard addons (odoo/addons) must be provided explicitly See pytest's documentation for other options, I would recommend ``-rXs``, ``-v`` and ``--showlocals``. When running "remote" tests as they take a very long time (hours) ``-x`` (aka ``--maxfail=1``) and ``--ff`` (run previously failed first) is also recommended unless e.g. you run the tests overnight. ``pytest.ini`` sample --------------------- .. code:: ini [github] owner = test-org token = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [role_reviewer] name = Dick Bong user = loginb token = bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb [role_self_reviewer] name = Fanny Chmelar user = loginc token = cccccccccccccccccccccccccccccccccccccccc [role_other] name = Harry Baals user = logind token = dddddddddddddddddddddddddddddddddddddddd