Submitter | Simon Heimberg |
---|---|
Date | Jan. 17, 2014, 11:47 a.m. |
Message ID | <c4bfc0a2ea569b670233.1389959278@lapsi.heimberg.home> |
Download | mbox | patch |
Permalink | /patch/3366/ |
State | Accepted |
Commit | e1e6ddaef299b245851f36eb01ec7d74876a477e |
Headers | show |
Comments
On 01/17/2014 12:47 PM, Simon Heimberg wrote: > # HG changeset patch > # User Simon Heimberg <simohe@besonet.ch> > # Date 1389959189 -3600 > # Node ID c4bfc0a2ea569b67023323602239fd364f1cd6cb > # Parent 38781a397ab08d2db66eb7df125b6c00395c3f55 > tests: fix test-run-tests.py on OS X > > Do the same hack as in test-doctests.py to let the test pass on OS X. > > diff -r 38781a397ab0 -r c4bfc0a2ea56 tests/test-run-tests.py > --- a/tests/test-run-tests.py Fre Jan 17 12:42:17 2014 +0100 > +++ b/tests/test-run-tests.py Fre Jan 17 12:46:29 2014 +0100 > @@ -4,8 +4,11 @@ > (both by design) > """ > > - > -import doctest, os, re > +import os, re > +# this is hack to make sure no escape characters are inserted into the output > +if 'TERM' in os.environ: > + del os.environ['TERM'] > +import doctest > run_tests = __import__('run-tests') > > def lm(expected, output): > @@ -54,7 +57,7 @@ > restore os.altsep > >>> os.altsep = _osaltsep > """ > - os.altsep # for pyflakes, because it does not see os in the doctest > + pass Unrelated? > > def otherostests(): > r"""test matching like running on non-windows os > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
On 17.01.2014 16:02, Mads Kiilerich wrote: > On 01/17/2014 12:47 PM, Simon Heimberg wrote: >> # HG changeset patch >> # User Simon Heimberg <simohe@besonet.ch> >> # Date 1389959189 -3600 >> # Node ID c4bfc0a2ea569b67023323602239fd364f1cd6cb >> # Parent 38781a397ab08d2db66eb7df125b6c00395c3f55 >> tests: fix test-run-tests.py on OS X >> >> Do the same hack as in test-doctests.py to let the test pass on OS X. >> >> diff -r 38781a397ab0 -r c4bfc0a2ea56 tests/test-run-tests.py >> --- a/tests/test-run-tests.py Fre Jan 17 12:42:17 2014 +0100 >> +++ b/tests/test-run-tests.py Fre Jan 17 12:46:29 2014 +0100 >> @@ -4,8 +4,11 @@ >> (both by design) >> """ >> - >> -import doctest, os, re >> +import os, re >> +# this is hack to make sure no escape characters are inserted into >> the output >> +if 'TERM' in os.environ: >> + del os.environ['TERM'] >> +import doctest >> run_tests = __import__('run-tests') >> def lm(expected, output): >> @@ -54,7 +57,7 @@ >> restore os.altsep >> >>> os.altsep = _osaltsep >> """ >> - os.altsep # for pyflakes, because it does not see os in the doctest >> + pass > > Unrelated? Well, it is not needed anymore. The os module is used at the top of the module, so pyflakes is pleased. Not sure if this means related or not. > >> def otherostests(): >> r"""test matching like running on non-windows os >> _______________________________________________ >> Mercurial-devel mailing list >> Mercurial-devel@selenic.com >> http://selenic.com/mailman/listinfo/mercurial-devel
On Fri, Jan 17, 2014 at 12:47:58PM +0100, Simon Heimberg wrote: > # HG changeset patch > # User Simon Heimberg <simohe@besonet.ch> > # Date 1389959189 -3600 > # Node ID c4bfc0a2ea569b67023323602239fd364f1cd6cb > # Parent 38781a397ab08d2db66eb7df125b6c00395c3f55 > tests: fix test-run-tests.py on OS X queued, thanks > > Do the same hack as in test-doctests.py to let the test pass on OS X. > > diff -r 38781a397ab0 -r c4bfc0a2ea56 tests/test-run-tests.py > --- a/tests/test-run-tests.py Fre Jan 17 12:42:17 2014 +0100 > +++ b/tests/test-run-tests.py Fre Jan 17 12:46:29 2014 +0100 > @@ -4,8 +4,11 @@ > (both by design) > """ > > - > -import doctest, os, re > +import os, re > +# this is hack to make sure no escape characters are inserted into the output > +if 'TERM' in os.environ: > + del os.environ['TERM'] > +import doctest > run_tests = __import__('run-tests') > > def lm(expected, output): > @@ -54,7 +57,7 @@ > restore os.altsep > >>> os.altsep = _osaltsep > """ > - os.altsep # for pyflakes, because it does not see os in the doctest > + pass > > def otherostests(): > r"""test matching like running on non-windows os > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
Patch
diff -r 38781a397ab0 -r c4bfc0a2ea56 tests/test-run-tests.py --- a/tests/test-run-tests.py Fre Jan 17 12:42:17 2014 +0100 +++ b/tests/test-run-tests.py Fre Jan 17 12:46:29 2014 +0100 @@ -4,8 +4,11 @@ (both by design) """ - -import doctest, os, re +import os, re +# this is hack to make sure no escape characters are inserted into the output +if 'TERM' in os.environ: + del os.environ['TERM'] +import doctest run_tests = __import__('run-tests') def lm(expected, output): @@ -54,7 +57,7 @@ restore os.altsep >>> os.altsep = _osaltsep """ - os.altsep # for pyflakes, because it does not see os in the doctest + pass def otherostests(): r"""test matching like running on non-windows os