tests: str(datafiles) instead of a longer thing
All threads resolved!
All threads resolved!
Replace some popular copypasta.
This important-looking invocation:
os.path.join(datafiles.dirname, datafiles.basename)
is equivalent to this shorter invocation:
project = str(datafiles)
It seems like it's very popular copypasta, replace it with the shorter one thus:
# Use 'gsed' or 'sed' etc. as appropriate for your system.
git config --global alias.sub '!f() { git grep --name-only --null "$1" | gxargs --null gsed --in-place --expression "s/$1/$2/g" ; }; f'
git sub 'os.path.join(datafiles.dirname, datafiles.basename)' 'str(datafiles)'
Edited by Angelos Evripiotis
Merge request reports
Activity
added 33 commits
-
85eaecfb...e1b1e6c9 - 32 commits from branch
master
- ab18ab8d - tests: str(datafiles) instead of a longer thing
-
85eaecfb...e1b1e6c9 - 32 commits from branch
- Resolved by Angelos Evripiotis
This looks good.
However an even neat way (in my opinion) would be to move the project to a fixture, and use "project" instead of datafiles as a parameter, since we are not using datafiles in most tests.
That's a nitpick and others might disagree so feel free to merge as is if want
assigned to @marge-bot123
mentioned in merge request !1239 (merged)
added 11 commits
-
ab18ab8d...c7470141 - 10 commits from branch
master
- 65f6d78b - tests: str(datafiles) instead of a longer thing
-
ab18ab8d...c7470141 - 10 commits from branch
assigned to @aevri
assigned to @marge-bot123
added 8 commits
-
65f6d78b...bc1b971e - 7 commits from branch
master
- f2b15d86 - tests: str(datafiles) instead of a longer thing
-
65f6d78b...bc1b971e - 7 commits from branch
mentioned in commit 7b8c730e
Please register or sign in to reply