Patchwork [STABLE] test: make test-propertycache.py python2.4 compatible

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 2, 2013, 9:51 a.m.
Message ID <2eadf787bb103eae7bc5.1380707488@vulgaris>
Download mbox | patch
Permalink /patch/2691/
State Accepted
Commit 21de61bc2ab59ec6bb1416ed9441b638db6d2c8c
Headers show

Comments

Pierre-Yves David - Oct. 2, 2013, 9:51 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1380705363 -7200
#      Wed Oct 02 11:16:03 2013 +0200
# Branch stable
# Node ID 2eadf787bb103eae7bc54c8fc261ed024b7d6f8c
# Parent  4d513f96a565639c0879086b68cf72a1e01e596c
test: make test-propertycache.py python2.4 compatible

The subprocess module have not `check_call` method in python2.4. Fall back to
calling `check` with return code verification.
Matt Mackall - Oct. 2, 2013, 6:48 p.m.
On Wed, 2013-10-02 at 11:51 +0200, pierre-yves.david@ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1380705363 -7200
> #      Wed Oct 02 11:16:03 2013 +0200
> # Branch stable
> # Node ID 2eadf787bb103eae7bc54c8fc261ed024b7d6f8c
> # Parent  4d513f96a565639c0879086b68cf72a1e01e596c
> test: make test-propertycache.py python2.4 compatible
> 
> The subprocess module have not `check_call` method in python2.4. Fall back to
> calling `check` with return code verification.

Queued for stable, thanks.

Patch

diff --git a/tests/test-propertycache.py b/tests/test-propertycache.py
--- a/tests/test-propertycache.py
+++ b/tests/test-propertycache.py
@@ -40,11 +40,11 @@  mercurial.localrepo.localrepository.test
 
 
 # create an empty repo. and instanciate it. It is important to run
 # those test on the real object to detect regression.
 repopath = os.path.join(os.environ['TESTTMP'], 'repo')
-subprocess.check_call(['hg', 'init', repopath])
+assert subprocess.call(['hg', 'init', repopath]) == 0
 ui = uimod.ui()
 repo = mercurial.hg.repository(ui, path=repopath).unfiltered()
 
 
 print ''