mirror of
https://github.com/vale981/releases
synced 2025-03-05 09:41:42 -05:00
Make integration test re #59 actually test both changelogs :D
This commit is contained in:
parent
979dd7c22c
commit
3fea44a0e6
1 changed files with 11 additions and 2 deletions
|
@ -4,6 +4,8 @@ import shutil
|
||||||
from spec import Spec, skip
|
from spec import Spec, skip
|
||||||
from invoke import run
|
from invoke import run
|
||||||
|
|
||||||
|
from invoke.vendor.six import string_types
|
||||||
|
|
||||||
|
|
||||||
class integration(Spec):
|
class integration(Spec):
|
||||||
def setup(self):
|
def setup(self):
|
||||||
|
@ -29,7 +31,12 @@ class integration(Spec):
|
||||||
flagstr, conf, folder, build)
|
flagstr, conf, folder, build)
|
||||||
result = run(cmd, warn=warn, hide=True)
|
result = run(cmd, warn=warn, hide=True)
|
||||||
if callable(asserts):
|
if callable(asserts):
|
||||||
asserts(result, build, target)
|
if isinstance(target, string_types):
|
||||||
|
targets = [target]
|
||||||
|
else:
|
||||||
|
targets = target
|
||||||
|
for target in targets:
|
||||||
|
asserts(result, build, target)
|
||||||
return result
|
return result
|
||||||
finally:
|
finally:
|
||||||
shutil.rmtree(build)
|
shutil.rmtree(build)
|
||||||
|
@ -95,4 +102,6 @@ class integration(Spec):
|
||||||
folder='multiple_changelogs',
|
folder='multiple_changelogs',
|
||||||
opts=None,
|
opts=None,
|
||||||
conf='multiple_changelogs',
|
conf='multiple_changelogs',
|
||||||
target='a_changelog')
|
# Ensure the asserts check both changelogs
|
||||||
|
target=['a_changelog', 'b_changelog'],
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue