Fix syntax issues / unused import reported by static code analysis

This commit is contained in:
Oliver Smith 2017-06-14 20:12:47 +02:00
parent 1e45c64698
commit 90c3a67329
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 2 additions and 4 deletions

View file

@ -63,6 +63,4 @@ def diff(args, files_a, files_b=None):
if add: if add:
ret.append(arch + "/" + file) ret.append(arch + "/" + file)
return sorted(ret) return sorted(ret)

View file

@ -20,7 +20,6 @@ import os
import sys import sys
import pytest import pytest
import types import types
import pathlib
import time import time
# Import from parent directory # Import from parent directory
@ -35,6 +34,7 @@ def args(request, tmpdir):
args.work = str(tmpdir) args.work = str(tmpdir)
return args return args
def clear_timestamps_from_files(files): def clear_timestamps_from_files(files):
""" """
Replace all last modified timestamps from pmb.helpers.repo.files() with Replace all last modified timestamps from pmb.helpers.repo.files() with
@ -54,7 +54,7 @@ def test_files_not_empty(args):
pkgs = args.work + "/packages" pkgs = args.work + "/packages"
for dir in ["", "armhf", "x86_64"]: for dir in ["", "armhf", "x86_64"]:
os.mkdir(pkgs + "/" + dir) os.mkdir(pkgs + "/" + dir)
open(pkgs+"/x86_64/test", "a").close() open(pkgs + "/x86_64/test", "a").close()
files = pmb.helpers.repo.files(args) files = pmb.helpers.repo.files(args)
clear_timestamps_from_files(files) clear_timestamps_from_files(files)
assert files == {"armhf": {}, "x86_64": {"test": None}} assert files == {"armhf": {}, "x86_64": {"test": None}}