Mercurial > public > mercurial-scm > python-hglib
comparison tests/common.py @ 134:1b47146a4a2c 1.4
style: fix long lines
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 30 Sep 2014 12:48:04 -0500 |
parents | d1a42c1d0b61 |
children | 6564544576b9 |
comparison
equal
deleted
inserted
replaced
133:b6f601ba7f3c | 134:1b47146a4a2c |
---|---|
18 os.path.join(os.environ["HGTMP"], self.__class__.__name__) | 18 os.path.join(os.environ["HGTMP"], self.__class__.__name__) |
19 | 19 |
20 self.clients = [] | 20 self.clients = [] |
21 self._oldopen = hglib.client.hgclient.open | 21 self._oldopen = hglib.client.hgclient.open |
22 # hglib.open = resultappender(self.clients)(hglib.open) | 22 # hglib.open = resultappender(self.clients)(hglib.open) |
23 hglib.client.hgclient.open = resultappender(self.clients)(hglib.client.hgclient.open) | 23 c = hglib.client.hgclient |
24 c.open = resultappender(self.clients)(c.open) | |
24 | 25 |
25 os.mkdir(self._testtmp) | 26 os.mkdir(self._testtmp) |
26 os.chdir(self._testtmp) | 27 os.chdir(self._testtmp) |
27 # until we can run norepo commands in the cmdserver | 28 # until we can run norepo commands in the cmdserver |
28 os.system('hg init') | 29 os.system('hg init') |
29 self.client = hglib.open() | 30 self.client = hglib.open() |
30 | 31 |
31 def tearDown(self): | 32 def tearDown(self): |
32 # on Windows we cannot rmtree before closing all instances because of used | 33 # on Windows we cannot rmtree before closing all instances |
33 # files | 34 # because of used files |
34 hglib.client.hgclient.open = self._oldopen | 35 hglib.client.hgclient.open = self._oldopen |
35 for client in self.clients: | 36 for client in self.clients: |
36 if client.server is not None: | 37 if client.server is not None: |
37 client.close() | 38 client.close() |
38 os.chdir('..') | 39 os.chdir('..') |