mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-24 20:48:31 -07:00
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
64 lines
2.5 KiB
Diff
64 lines
2.5 KiB
Diff
tests require a more generic method to open, close files to work with pypy
|
|
https://bugs.pypy.org/issue1380
|
|
diff -ur python-hglib-0.3.orig/tests/test-import.py python-hglib-0.3/tests/test-import.py
|
|
--- tests/test-import.py 2012-07-01 17:11:01.000000000 +0800
|
|
+++ tests/test-import.py 2013-01-23 23:44:12.389473396 +0800
|
|
@@ -22,7 +22,8 @@
|
|
self.assertEquals(self.client.cat(['a']), '1\n')
|
|
|
|
def test_basic_file(self):
|
|
- open('patch', 'wb').write(patch)
|
|
+ with open('patch', 'wb') as f:
|
|
+ f.write(patch)
|
|
|
|
# --no-commit
|
|
self.client.import_(['patch'], nocommit=True)
|
|
diff -ur python-hglib-0.3.orig/tests/test-config.py python-hglib-0.3/tests/test-config.py
|
|
--- tests/test-config.py 2012-07-01 17:11:01.000000000 +0800
|
|
+++ tests/test-config.py 2013-01-23 23:55:06.120502085 +0800
|
|
@@ -3,7 +3,8 @@
|
|
class test_config(common.basetest):
|
|
def setUp(self):
|
|
common.basetest.setUp(self)
|
|
- open('.hg/hgrc', 'a').write('[section]\nkey=value\n')
|
|
+ with open('.hg/hgrc', 'a') as f:
|
|
+ f.write('[section]\nkey=value\n')
|
|
self.client = hglib.open()
|
|
|
|
def test_basic(self):
|
|
diff -ur python-hglib-0.3.orig/tests/test-paths.py python-hglib-0.3/tests/test-paths.py
|
|
--- tests/test-paths.py 2012-07-01 17:11:01.000000000 +0800
|
|
+++ tests/test-paths.py 2013-01-24 00:04:36.266527106 +0800
|
|
@@ -3,8 +3,8 @@
|
|
|
|
class test_paths(common.basetest):
|
|
def test_basic(self):
|
|
- open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n')
|
|
-
|
|
+ with open('.hg/hgrc', 'a') as f:
|
|
+ f.write('[paths]\nfoo = bar\n')
|
|
# hgrc isn't watched for changes yet, have to reopen
|
|
self.client = hglib.open()
|
|
paths = self.client.paths()
|
|
diff -ur python-hglib-0.3.orig/tests/test-update.py python-hglib-0.3/tests/test-update.py
|
|
--- tests/test-update.py 2012-11-09 18:56:31.000000000 +0800
|
|
+++ tests/test-update.py 2013-01-24 00:05:40.866529942 +0800
|
|
@@ -33,7 +33,8 @@
|
|
self.client.commit('fourth')
|
|
self.client.update(rev2)
|
|
old = open('a').read()
|
|
- open('a', 'wb').write('a' + old)
|
|
+ with open('a', 'wb') as f:
|
|
+ f.write('a' + old)
|
|
u, m, r, ur = self.client.update()
|
|
self.assertEquals(u, 0)
|
|
self.assertEquals(m, 1)
|
|
@@ -68,5 +69,6 @@
|
|
self.assertEquals(old, open('a').read())
|
|
|
|
def test_basic_plain(self):
|
|
- open('.hg/hgrc', 'a').write('[defaults]\nupdate=-v\n')
|
|
+ with open('.hg/hgrc', 'a') as f:
|
|
+ f.write('[defaults]\nupdate=-v\n')
|
|
self.test_basic()
|