Mercurial > python-hglib
annotate tests/test-clone.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 | a4fcece7dd8e |
children | 4359cabcb0cc |
rev | line source |
---|---|
93
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
1 import os |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
2 import common |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
3 import hglib |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
4 |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
5 class test_clone(common.basetest): |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
6 def test_basic(self): |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
7 self.append('a', 'a') |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
8 self.client.commit('first', addremove=True) |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
9 cloned = hglib.clone('.', 'cloned') |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
10 self.assertRaises(ValueError, cloned.log) |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
11 cloned.open() |
a4fcece7dd8e
hglib: add top level clone method
Idan Kamara <idankk86@gmail.com>
parents:
diff
changeset
|
12 self.assertEquals(self.client.log(), cloned.log()) |