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:
ret.append(arch + "/" + file)
return sorted(ret)

View File

@ -20,7 +20,6 @@ import os
import sys
import pytest
import types
import pathlib
import time
# Import from parent directory
@ -35,6 +34,7 @@ def args(request, tmpdir):
args.work = str(tmpdir)
return args
def clear_timestamps_from_files(files):
"""
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"
for dir in ["", "armhf", "x86_64"]:
os.mkdir(pkgs + "/" + dir)
open(pkgs+"/x86_64/test", "a").close()
open(pkgs + "/x86_64/test", "a").close()
files = pmb.helpers.repo.files(args)
clear_timestamps_from_files(files)
assert files == {"armhf": {}, "x86_64": {"test": None}}