summaryrefslogtreecommitdiff
path: root/tests/sources
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-10 16:20:40 +0000
committerBenjamin Schubert <ben.c.schubert@gmail.com>2019-03-20 09:38:42 +0000
commit973b779741e60291fd3a99b373998a79e51f1bb7 (patch)
tree6cbe6e2c82a222384e2498a5f52c6e640c5ba3ec /tests/sources
parent48456242b0a3067c0aa6a551c4a0c5972baf27c4 (diff)
downloadbuildstream-973b779741e60291fd3a99b373998a79e51f1bb7.tar.gz
tests:lint: rename variables shadowing others
Diffstat (limited to 'tests/sources')
-rw-r--r--tests/sources/generic/workspace.py4
-rw-r--r--tests/sources/zip.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/sources/generic/workspace.py b/tests/sources/generic/workspace.py
index 45e843317..d332a6ef6 100644
--- a/tests/sources/generic/workspace.py
+++ b/tests/sources/generic/workspace.py
@@ -136,8 +136,8 @@ class WorkspaceCreator():
assert not any(states[e] != 'buildable' for e, _ in element_tuples)
# Check that the executable hello file is found in each workspace
- for _, workspace_dir in element_tuples:
- filename = os.path.join(workspace_dir, 'usr', 'bin', 'hello')
+ for _, workspace in element_tuples:
+ filename = os.path.join(workspace, 'usr', 'bin', 'hello')
assert os.path.exists(filename)
return element_tuples
diff --git a/tests/sources/zip.py b/tests/sources/zip.py
index 273c0c3a4..64ef61c21 100644
--- a/tests/sources/zip.py
+++ b/tests/sources/zip.py
@@ -18,12 +18,12 @@ DATA_DIR = os.path.join(
def _assemble_zip(workingdir, dstfile):
old_dir = os.getcwd()
os.chdir(workingdir)
- with zipfile.ZipFile(dstfile, "w") as zip:
+ with zipfile.ZipFile(dstfile, "w") as zipfp:
for root, dirs, files in os.walk('.'):
names = dirs + files
names = [os.path.join(root, name) for name in names]
for name in names:
- zip.write(name)
+ zipfp.write(name)
os.chdir(old_dir)