Mercurial > python-hglib
comparison tests/test-paths.py @ 118:e738d6fe5f3f 1.1
tests: make the tests work under Pypy (issue3965)
..which needs explicit close() due to lack of reference counting.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 23 Jun 2013 17:52:16 -0500 |
parents | eac8be119d81 |
children | 4359cabcb0cc |
comparison
equal
deleted
inserted
replaced
117:59cb26bf866e | 118:e738d6fe5f3f |
---|---|
1 import common, os | 1 import common, os |
2 import hglib | 2 import hglib |
3 | 3 |
4 class test_paths(common.basetest): | 4 class test_paths(common.basetest): |
5 def test_basic(self): | 5 def test_basic(self): |
6 open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n') | 6 f = open('.hg/hgrc', 'a') |
7 f.write('[paths]\nfoo = bar\n') | |
8 f.close() | |
7 | 9 |
8 # hgrc isn't watched for changes yet, have to reopen | 10 # hgrc isn't watched for changes yet, have to reopen |
9 self.client = hglib.open() | 11 self.client = hglib.open() |
10 paths = self.client.paths() | 12 paths = self.client.paths() |
11 self.assertEquals(len(paths), 1) | 13 self.assertEquals(len(paths), 1) |