sapling/eden/scm/tests/test-check-fix-code.t
Mark Thomas 052e7c3877 check-code: convert to Python 3
Summary:
Update `contrib/check-code.py` to Python 3.

Mostly it was already compatible, however stricter regular expression parsing
revealed a case where one of our tests wasn't working, and as a result lots of
instances of `open(file).read()` existed that this test should have caught.

I have fixed up most of the instances in the code, although there are many
in the test suite that I have ignored for now.

Reviewed By: quark-zju

Differential Revision: D21427212

fbshipit-source-id: 7461a7c391e0ade947f779a2b476ca937fd24a8d
2020-05-07 09:07:50 -07:00

12 lines
314 B
Perl

#chg-compatible
#require test-repo
$ . "$TESTDIR/helpers-testrepo.sh"
$ cd "$TESTDIR"/..
$ testrepohg files . > $TESTTMP/filelist
$ testrepohgenv; PYTHONPATH= ./contrib/fix-code.py --dry-run `cat $TESTTMP/filelist`
# In case the above list is not empty, run 'contrib/fix-code.py FILE...' to
# fix them.