Files
gentoo/dev-python/hglib/files/hglib-0.9-pypy-tests.patch
T
Robin H. Johnson 56bd759df1 proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.

This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.

Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
2015-08-08 17:38:18 -07:00

87 lines
2.9 KiB
Diff

# HG changeset patch
# User Matt Mackall <mpm@selenic.com>
# Date 1372027936 18000
# Node ID e738d6fe5f3ff613a4ee2c0d759eee0ee4f5c9ff
# Parent 59cb26bf866e793b184842ad23f82fc3551d1742
tests: make the tests work under Pypy (issue3965)
..which needs explicit close() due to lack of reference counting.
diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-config.py
--- a/tests/test-config.py Fri Jun 14 18:36:56 2013 +0300
+++ b/tests/test-config.py Sun Jun 23 17:52:16 2013 -0500
@@ -3,7 +3,9 @@
class test_config(common.basetest):
def setUp(self):
common.basetest.setUp(self)
- open('.hg/hgrc', 'a').write('[section]\nkey=value\n')
+ f = open('.hg/hgrc', 'a')
+ f.write('[section]\nkey=value\n')
+ f.close()
self.client = hglib.open()
def test_basic(self):
diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-import.py
--- a/tests/test-import.py Fri Jun 14 18:36:56 2013 +0300
+++ b/tests/test-import.py Sun Jun 23 17:52:16 2013 -0500
@@ -22,7 +22,9 @@
self.assertEquals(self.client.cat(['a']), '1\n')
def test_basic_file(self):
- open('patch', 'wb').write(patch)
+ f = open('patch', 'wb')
+ f.write(patch)
+ f.close()
# --no-commit
self.client.import_(['patch'], nocommit=True)
diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-paths.py
--- a/tests/test-paths.py Fri Jun 14 18:36:56 2013 +0300
+++ b/tests/test-paths.py Sun Jun 23 17:52:16 2013 -0500
@@ -3,7 +3,9 @@
class test_paths(common.basetest):
def test_basic(self):
- open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n')
+ f = open('.hg/hgrc', 'a')
+ f.write('[paths]\nfoo = bar\n')
+ f.close()
# hgrc isn't watched for changes yet, have to reopen
self.client = hglib.open()
diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-update.py
--- a/tests/test-update.py Fri Jun 14 18:36:56 2013 +0300
+++ b/tests/test-update.py Sun Jun 23 17:52:16 2013 -0500
@@ -33,7 +33,9 @@
self.client.commit('fourth')
self.client.update(rev2)
old = open('a').read()
- open('a', 'wb').write('a' + old)
+ f = open('a', 'wb')
+ f.write('a' + old)
+ f.close()
u, m, r, ur = self.client.update()
self.assertEquals(u, 0)
self.assertEquals(m, 1)
@@ -68,12 +70,16 @@
self.assertEquals(old, open('a').read())
def test_basic_plain(self):
- open('.hg/hgrc', 'a').write('[defaults]\nupdate=-v\n')
+ f = open('.hg/hgrc', 'a')
+ f.write('[defaults]\nupdate=-v\n')
+ f.close()
self.test_basic()
def test_largefiles(self):
import os
- open('.hg/hgrc', 'a').write('[extensions]\nlargefiles=\n')
+ f = open('.hg/hgrc', 'a')
+ f.write('[extensions]\nlargefiles=\n')
+ f.close()
self.append('b', 'a')
try:
self.client.rawcommand(['add', 'b', '--large'])