aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-01-03 18:45:01 +0100
committerGuido Günther <agx@sigxcpu.org>2017-01-03 18:47:14 +0100
commitab858d2850ca2bee0130707b77f22f713d68a00b (patch)
tree98cec0b7a00d02454618d263aec8a827b16cc255
parentbbee246b1e2c62fa869c7918c1dfcda52354283f (diff)
tests/component/rpm: flake8 clean
-rwxr-xr-xgbp/scripts/pq.py2
-rw-r--r--setup.cfg2
-rw-r--r--tests/component/rpm/test_buildpackage_rpm.py7
-rw-r--r--tests/component/rpm/test_pq_rpm.py2
4 files changed, 6 insertions, 7 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index 8c278123..18191a14 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -169,7 +169,7 @@ def commit_patches(repo, branch, patches, options, patch_dir):
msg = format_series_diff(added, removed, options)
if not repo.is_clean(paths='debian/patches')[0]:
- repo.add_files(PATCH_DIR)
+ repo.add_files(PATCH_DIR, force=True)
repo.commit_staged(msg=msg)
return added, removed
diff --git a/setup.cfg b/setup.cfg
index 8424959a..20ca79d3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -18,4 +18,4 @@ modules = gbp, tests/test_*.py
# E265: block comment should start with '# '
ignore=E501,E265
builtins=unicode,execfile,raw_input
-exclude=tests/component/rpm/,svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg
+exclude=tests/component/rpm/data,svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg
diff --git a/tests/component/rpm/test_buildpackage_rpm.py b/tests/component/rpm/test_buildpackage_rpm.py
index 71ff7b77..020c0a0e 100644
--- a/tests/component/rpm/test_buildpackage_rpm.py
+++ b/tests/component/rpm/test_buildpackage_rpm.py
@@ -414,14 +414,13 @@ class TestGbpRpm(RpmRepoTestBase):
sub_files = sub_repo.ls_tree('HEAD')
master_files = ['gbp-test-native-1.0/' + path for
- path in repo.ls_tree('HEAD')]
+ path in repo.ls_tree('HEAD')]
# Test
eq_(mock_gbp(['--git-submodules']), 0)
zip_files = ls_zip('../rpmbuild/SOURCES/gbp-test-native-1.0.zip', False)
- ref_files = master_files + \
- ['gbp-test-native-1.0/gbp-test-native2.repo/' + path for
- path in sub_files]
+ ref_files = master_files + ['gbp-test-native-1.0/gbp-test-native2.repo/' + path for
+ path in sub_files]
self.check_files(ref_files, zip_files)
# Test submodule failure
diff --git a/tests/component/rpm/test_pq_rpm.py b/tests/component/rpm/test_pq_rpm.py
index 55a5159b..05f93806 100644
--- a/tests/component/rpm/test_pq_rpm.py
+++ b/tests/component/rpm/test_pq_rpm.py
@@ -61,7 +61,7 @@ class TestPqRpm(RpmRepoTestBase):
# Test invalid cmdline options
with assert_raises(SystemExit):
- with capture_stderr() as c:
+ with capture_stderr():
mock_pq(['--invalid-arg=123'])
def test_import_outside_repo(self):