view pytest.ini @ 5877:ba5fee3879c8

utils: improve extract_mentioned_users usefulness Previously, extract_mentioned_users performed a regex search, converted to a set to remove duplicates, converted that set back into a list, and sorted the list on username, ignoring case. Every single caller of the function then promptly took the carefully pruned and sorted result and put it back into a set, rendering the entire exercise pointless. In addition, every caller also resolved the usernames to database User objects. In this changeset, extract_mentioned_users is changed to return a set of database User objects directly. A new extract_mentioned_usernames function, which does only username extraction, is kept for the sole purpose of providing a more testable interface (no database needed). Bonus feature: The new extract_mentioned_users will prune non-existent users, as well as the DEFAULT user. This means it is no longer possible to @mention (and send notifications to) the DEFAULT user.
author Søren Løvborg <sorenl@unity3d.com>
date Wed, 06 Apr 2016 14:50:47 +0200
parents d88077fae3d6
children afa5e0bdb76f
line wrap: on
line source

[pytest]
# only look for tests in kallithea/tests
python_files = kallithea/tests/**/test_*.py
addopts =
    # --verbose
    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
    -rfEsxXw
    # Shorter scrollbacks; less stuff to scroll through
    --tb=short