Skip to content

Commit

Permalink
fix bw test -e
Browse files Browse the repository at this point in the history
  • Loading branch information
trehn committed Sep 24, 2017
1 parent daa0add commit 8be349b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bundlewrap/cmdline/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ def build_parser_bw():
"-e",
"--empty-groups",
action='store_true',
dest='orphaned_groups',
dest='empty_groups',
help=_("check for empty groups"),
)
parser_test.add_argument(
Expand Down
16 changes: 8 additions & 8 deletions bundlewrap/cmdline/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ def test_orphaned_bundles(repo):
exit(1)


def test_orphaned_groups(repo):
orphaned_groups = set()
def test_empty_groups(repo):
empty_groups = set()
for group in repo.groups:
if not group.nodes:
orphaned_groups.append(group)
for bundle in sorted(orphaned_groups):
empty_groups.add(group)
for group in sorted(empty_groups):
io.stderr(_("{x} {group} is an empty group").format(
group=bold(group),
x=red("✘"),
))
if orphaned_groups:
if empty_groups:
exit(1)


Expand Down Expand Up @@ -232,7 +232,7 @@ def bw_test(repo, args):
args['items'] or
args['metadata_collisions'] or
args['orphaned_bundles'] or
args['orphaned_groups'] or
args['empty_groups'] or
args['plugin_conflicts'] or
args['subgroup_loops']
)
Expand All @@ -257,8 +257,8 @@ def bw_test(repo, args):
if args['subgroup_loops'] and not QUIT_EVENT.is_set():
test_subgroup_loops(repo)

if args['orphaned_groups'] and not QUIT_EVENT.is_set():
test_orphaned_groups(repo)
if args['empty_groups'] and not QUIT_EVENT.is_set():
test_empty_groups(repo)

if args['orphaned_bundles'] and not QUIT_EVENT.is_set():
test_orphaned_bundles(repo)
Expand Down

0 comments on commit 8be349b

Please sign in to comment.