Add system's requirements.txt, enforce flake8 linter

Fix style issues in functional tests.
This commit is contained in:
Andrey Smirnov
2017-04-27 18:58:15 +03:00
parent 7a7b981d4f
commit c798db8056
44 changed files with 334 additions and 260 deletions
-3
View File
@@ -1,6 +1,3 @@
"""
Testing package subcommands
"""
from .search import *
from .show import *
+9 -4
View File
@@ -1,12 +1,16 @@
from lib import BaseTest
def sortLines(_, s):
return "\n".join(sorted(s.split("\n")))
class SearchPackage1Test(BaseTest):
"""
search package: regular search
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package search '$$Architecture (i386), Name (% *-dev)'"
@@ -31,7 +35,7 @@ class SearchPackage4Test(BaseTest):
search package: by dependency
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package search coreutils"
@@ -40,13 +44,14 @@ class SearchPackage5Test(BaseTest):
search package: with format
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package search -format='{{.Package}}#{{.Version}}' '$$Architecture (i386), Name (% *-dev)'"
class SearchPackage6Test(BaseTest):
"""
search package: no query
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package search"
+10 -6
View File
@@ -1,12 +1,16 @@
from lib import BaseTest
def sortLines(_, s):
return "\n".join(sorted(s.split("\n")))
class ShowPackage1Test(BaseTest):
"""
show package: regular show
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show 'Name (% nginx-extras*)'"
@@ -22,7 +26,7 @@ class ShowPackage3Test(BaseTest):
show package: by key
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -31,7 +35,7 @@ class ShowPackage4Test(BaseTest):
show package: with files
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
gold_processor = BaseTest.expand_environ
runCmd = "aptly package show -with-files nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -41,7 +45,7 @@ class ShowPackage5Test(BaseTest):
show package: with inclusion
"""
fixtureDB = True
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -58,7 +62,7 @@ class ShowPackage6Test(BaseTest):
"aptly repo create repo1",
"aptly repo import wheezy-main repo1 nginx",
]
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references nginx-full_1.2.1-2.2+wheezy2_amd64"
@@ -72,5 +76,5 @@ class ShowPackage7Test(BaseTest):
"aptly repo add a ${files}",
"aptly repo add b ${testfiles}"
]
outputMatchPrepare = lambda _, s: "\n".join(sorted(s.split("\n")))
outputMatchPrepare = sortLines
runCmd = "aptly package show -with-references \"pyspi (0.6.1-1.3)\""