Merge pull request #3011 from pypeclub/chore/default_workfile_subset_name

General: default workfile subset name for workfile
This commit is contained in:
Petr Kalis 2022-04-06 13:53:41 +02:00 committed by GitHub
commit ab3fae2efa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View file

@ -279,6 +279,15 @@
"tasks": [],
"template": "{family}{variant}"
},
{
"families": [
"workfile"
],
"hosts": [],
"task_types": [],
"tasks": [],
"template": "{family}{Task}"
},
{
"families": [
"render"

View file

@ -24,16 +24,18 @@ class DBAssert:
else:
args[key] = val
msg = None
no_of_docs = dbcon.count_documents(args)
if expected != no_of_docs:
msg = "Not expected no of versions. "\
"Expected {}, found {}".format(expected, no_of_docs)
args.pop("type")
detail_str = " "
if args:
detail_str = " with {}".format(args)
detail_str = " with '{}'".format(args)
msg = None
no_of_docs = dbcon.count_documents(args)
if expected != no_of_docs:
msg = "Not expected no of '{}'{}."\
"Expected {}, found {}".format(queried_type,
detail_str,
expected, no_of_docs)
status = "successful"
if msg:
@ -42,7 +44,5 @@ class DBAssert:
print("Comparing count of {}{} {}".format(queried_type,
detail_str,
status))
if msg:
print(msg)
return msg