##// END OF EJS Templates
tests: enforce use of $PYTHON in tests
tests: enforce use of $PYTHON in tests

File last commit:

r32851:cb6436e0 default
r32939:cad62cb3 default
Show More
test-check-config.t
38 lines | 1.1 KiB | text/troff | Tads3Lexer
/ tests / test-check-config.t
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 #require test-repo
timeless
tests: silence test-repo obsolete warning...
r29219 $ . "$TESTDIR/helpers-testrepo.sh"
Gregory Szorc
tests: add test coverage for check-config...
r32846
Sanity check check-config.py
$ cat > testfile.py << EOF
> # Good
> foo = ui.config('ui', 'username')
> # Missing
> foo = ui.config('ui', 'doesnotexist')
> # Missing different type
> foo = ui.configint('ui', 'missingint')
> # Missing with default value
> foo = ui.configbool('ui', 'missingbool1', default=True)
> foo = ui.configbool('ui', 'missingbool2', False)
> EOF
$ cat > files << EOF
> mercurial/help/config.txt
> $TESTTMP/testfile.py
> EOF
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 $ cd "$TESTDIR"/..
Gregory Szorc
tests: add test coverage for check-config...
r32846 $ python contrib/check-config.py < $TESTTMP/files
undocumented: ui.doesnotexist (str)
undocumented: ui.missingbool1 (bool) [True]
undocumented: ui.missingbool2 (bool)
undocumented: ui.missingint (int)
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 New errors are not allowed. Warnings are strongly discouraged.
$ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
FUJIWARA Katsunori
tests: execute check-config.py without xargs...
r27992 > python contrib/check-config.py
Gregory Szorc
profiling: allow configuring minimum display threshold for hotpath...
r32851 limit = ui.configwith(fraction, 'profiling', 'showmin', 0.05)
conflict on profiling.showmin: ('with', '0.05') != ('with', '0.005')