summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-02-19 12:43:24 +0100
committerGuido Günther <agx@sigxcpu.org>2015-02-20 11:38:11 +0100
commitc22fb3cb2eadaaedf8ff7d68855d340975dd4c6b (patch)
tree7919f96e2d000e9dcea768e8be8083427cd8bf08 /tests
parentf1f37b96426a4922b047536595c7fa30713f394a (diff)
Ignore return types of write and shutil.copy
Python3 does not return None anymore
Diffstat (limited to 'tests')
-rw-r--r--tests/test_Changelog.py4
-rw-r--r--tests/test_Config.py4
-rw-r--r--tests/test_GitRepository.py16
-rw-r--r--tests/test_GitVfs.py2
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/test_Changelog.py b/tests/test_Changelog.py
index 30f25e5..9b0a0e7 100644
--- a/tests/test_Changelog.py
+++ b/tests/test_Changelog.py
@@ -237,7 +237,7 @@ def test_add_section():
>>> testclname = os.path.join(testdebdir, "changelog")
>>> os.mkdir(testdebdir)
>>> clh = open(os.path.join(testdebdir, "changelog"), "w")
- >>> clh.write(cl_debian)
+ >>> ret = clh.write(cl_debian)
>>> clh.close()
>>> os.chdir(testdir)
>>> os.path.abspath(os.path.curdir) == testdir
@@ -283,7 +283,7 @@ def test_add_entry():
>>> testclname = os.path.join(testdebdir, "changelog")
>>> os.mkdir(testdebdir)
>>> clh = open(os.path.join(testdebdir, "changelog"), "w")
- >>> clh.write(cl_debian)
+ >>> ret = clh.write(cl_debian)
>>> clh.close()
>>> os.chdir(testdir)
>>> os.path.abspath(os.path.curdir) == testdir
diff --git a/tests/test_Config.py b/tests/test_Config.py
index 6750d84..329265b 100644
--- a/tests/test_Config.py
+++ b/tests/test_Config.py
@@ -68,14 +68,14 @@ def test_filter():
>>> tmpdir = str(context.new_tmpdir('bar'))
>>> confname = os.path.join(tmpdir, 'gbp.conf')
>>> f = open(confname, 'w')
- >>> f.write('[bar]\\nfilter = asdf\\n')
+ >>> ret = f.write('[bar]\\nfilter = asdf\\n')
>>> f.close()
>>> os.environ['GBP_CONF_FILES'] = confname
>>> parser = GbpOptionParser('bar')
>>> parser.config['filter']
['asdf']
>>> f = open(confname, 'w')
- >>> f.write("[bar]\\nfilter = ['this', 'is', 'a', 'list']\\n")
+ >>> ret = f.write("[bar]\\nfilter = ['this', 'is', 'a', 'list']\\n")
>>> f.close()
>>> parser = GbpOptionParser('bar')
>>> parser.config['filter']
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index d9fc539..30e25c2 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -74,8 +74,8 @@ def test_add_files():
>>> import gbp.git, shutil, os
>>> repo = gbp.git.GitRepository(repo_dir)
- >>> shutil.copy(os.path.join(repo.path, ".git/HEAD"), \
- os.path.join(repo.path, "testfile"))
+ >>> ret = shutil.copy(os.path.join(repo.path, ".git/HEAD"),
+ ... os.path.join(repo.path, "testfile"))
>>> repo.is_clean()[0]
False
>>> repo.is_clean(ignore_untracked=True)[0]
@@ -113,8 +113,8 @@ def test_clean():
>>> import gbp.git, shutil, os
>>> repo = gbp.git.GitRepository(repo_dir)
- >>> shutil.copy(os.path.join(repo.path, ".git/HEAD"), \
- os.path.join(repo.path, "testclean"))
+ >>> ret = shutil.copy(os.path.join(repo.path, ".git/HEAD"),
+ ... os.path.join(repo.path, "testclean"))
>>> repo.clean(dry_run=True)
>>> repo.is_clean()[0]
False
@@ -202,7 +202,7 @@ def test_set_upstream_branch():
>>> import gbp.git
>>> repo = gbp.git.GitRepository(repo_dir)
>>> os.makedirs(os.path.join(repo.git_dir, 'refs/remotes/origin'))
- >>> shutil.copy(os.path.join(repo.git_dir, 'refs/heads/master'), \
+ >>> ret = shutil.copy(os.path.join(repo.git_dir, 'refs/heads/master'), \
os.path.join(repo.git_dir, 'refs/remotes/origin/'))
>>> repo.add_remote_repo('origin', 'git://git.example.com/git/origin')
>>> repo.set_upstream_branch('master', 'origin/master')
@@ -387,7 +387,7 @@ def test_list_files():
[]
>>> repo.list_files(['modified', 'deleted', 'cached'])
['testfile']
- >>> shutil.copy(src, dst)
+ >>> ret = shutil.copy(src, dst)
>>> repo.list_files(['modified'])
['testfile']
>>> repo.add_files(dst)
@@ -401,7 +401,7 @@ def test_list_files():
>>> repo.force_head('HEAD^', hard=True)
>>> repo.list_files(['modified'])
[]
- >>> shutil.copy(src, dst)
+ >>> ret = shutil.copy(src, dst)
>>> repo.list_files(['modified'])
['testfile']
>>> repo.commit_files(dst, msg="foo")
@@ -889,7 +889,7 @@ def test_status():
>>> import gbp.git, os, shutil
>>> repo = gbp.git.GitRepository(repo_dir)
>>> fname = os.path.join(repo.path, "test_status")
- >>> shutil.copy(os.path.join(repo.path, ".git/HEAD"), fname)
+ >>> ret = shutil.copy(os.path.join(repo.path, ".git/HEAD"), fname)
>>> repo.status().items()
[('??', ['test_status'])]
>>> repo.status(['bla*']).items()
diff --git a/tests/test_GitVfs.py b/tests/test_GitVfs.py
index 8e04954..8fec765 100644
--- a/tests/test_GitVfs.py
+++ b/tests/test_GitVfs.py
@@ -28,7 +28,7 @@ def test_read():
>>> repo = gbp.git.GitRepository.create(str(repo_dir))
>>> f = open(os.path.join(repo.path, 'foo.txt'), 'w')
>>> content = 'al pha\\na\\nb\\nc'
- >>> f.write('al pha\\na\\nb\\nc')
+ >>> ret = f.write('al pha\\na\\nb\\nc')
>>> f.close()
>>> repo.add_files(repo.path, force=True)
>>> repo.commit_all(msg="foo")