mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
4e8707262f
Summary: In the future `python` will no longer be able to import `bindings`. Change them to `hg debugpython` so they stay compatible. I dropped the "custom hghave" feature. It breaks and I don't think there are users of it. Reviewed By: singhsrb Differential Revision: D17429689 fbshipit-source-id: 96e55ef25a027bd4ad33fc279f27c1d5cbed6861
28 lines
602 B
Raku
28 lines
602 B
Raku
#require parso
|
|
|
|
$ cat > a.py << EOF
|
|
> from testutil.autofix import eq
|
|
> from testutil.dott import sh
|
|
> eq(1 + 2, 0)
|
|
> eq(list(range(3)), None)
|
|
> eq("\n".join(map(str,range(3))), None)
|
|
> sh % "printf foo"
|
|
> sh % "printf bar" == "baz"
|
|
> EOF
|
|
|
|
$ hg debugpython -- a.py 2>&1 | tail -1
|
|
a.py:3: 3 != 0
|
|
|
|
$ hg debugpython -- a.py --fix
|
|
$ cat a.py
|
|
from testutil.autofix import eq
|
|
from testutil.dott import sh
|
|
eq(1 + 2, 3)
|
|
eq(list(range(3)), [0, 1, 2])
|
|
eq("\n".join(map(str,range(3))), r"""
|
|
0
|
|
1
|
|
2""")
|
|
sh % "printf foo" == 'foo'
|
|
sh % "printf bar" == 'bar'
|