mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
OP-3426 - updated filtering logic
This commit is contained in:
parent
f73330565e
commit
dab37abea9
2 changed files with 11 additions and 6 deletions
|
|
@ -228,12 +228,14 @@ class DBHandler:
|
||||||
return query
|
return query
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
# handler = DBHandler(uri="mongodb://localhost:27017")
|
handler = DBHandler(uri="mongodb://localhost:27017")
|
||||||
# #
|
# #
|
||||||
# backup_dir = "c:\\projects\\test_zips\\test_maya_publish\\input\\dumps"
|
backup_dir = "c:\\projects\\test_zips\\test_nuke_deadline_publish\\input\\dumps"
|
||||||
# # #
|
# # #
|
||||||
# handler.backup_to_dump("avalon", backup_dir, True, collection="test_project")
|
handler.backup_to_dump("avalon_tests", backup_dir, True, collection="test_project")
|
||||||
# handler.setup_from_dump("avalon_tests", backup_dir, True, db_name_out="avalon", collection="test_project")
|
#handler.backup_to_dump("openpype_tests", backup_dir, True, collection="settings")
|
||||||
|
|
||||||
|
# handler.setup_from_dump("avalon_tests", backup_dir, True, db_name_out="avalon_tests", collection="test_project")
|
||||||
# handler.setup_from_sql_file("avalon_tests", "c:\\projects\\sql\\item.sql",
|
# handler.setup_from_sql_file("avalon_tests", "c:\\projects\\sql\\item.sql",
|
||||||
# collection="test_project",
|
# collection="test_project",
|
||||||
# drop=False, mode="upsert")
|
# drop=False, mode="upsert")
|
||||||
|
|
|
||||||
|
|
@ -338,9 +338,12 @@ class PublishTest(ModuleUnitTest):
|
||||||
|
|
||||||
filtered_published = set()
|
filtered_published = set()
|
||||||
for pub_path in published:
|
for pub_path in published:
|
||||||
for val in skip_compare_folders:
|
if skip_compare_folders:
|
||||||
if not re.search(val, pub_path):
|
if not any([re.search(val, pub_path)
|
||||||
|
for val in skip_compare_folders]):
|
||||||
filtered_published.add(pub_path)
|
filtered_published.add(pub_path)
|
||||||
|
else:
|
||||||
|
filtered_published.add(pub_path)
|
||||||
|
|
||||||
not_matched = expected.symmetric_difference(filtered_published)
|
not_matched = expected.symmetric_difference(filtered_published)
|
||||||
if not_matched:
|
if not_matched:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue