From 669efeff7894a179cb5a2a4899de123dca7a55f3 Mon Sep 17 00:00:00 2001 From: Daniel King Date: Wed, 12 Oct 2022 15:17:00 -0400 Subject: [PATCH] [qob] fix ServiceBackend.get_flags I just plainly implemented this wrong the first time. --- hail/python/hail/backend/service_backend.py | 2 +- hail/python/test/hail/test_context.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hail/python/hail/backend/service_backend.py b/hail/python/hail/backend/service_backend.py index 1a2c33a51f25..46767eafbd92 100644 --- a/hail/python/hail/backend/service_backend.py +++ b/hail/python/hail/backend/service_backend.py @@ -727,7 +727,7 @@ def set_flags(self, **flags: str): self.flags.update(flags) def get_flags(self, *flags) -> Mapping[str, str]: - return frozendict(self.flags) + return {flag: self.flags[flag] for flag in flags} @property def requires_lowering(self): diff --git a/hail/python/test/hail/test_context.py b/hail/python/test/hail/test_context.py index b2645ae9405a..ac8a16ad0a4a 100644 --- a/hail/python/test/hail/test_context.py +++ b/hail/python/test/hail/test_context.py @@ -29,3 +29,7 @@ def test_top_level_functions_are_do_not_error(self): def test_tmpdir_runs(self): isinstance(hl.tmp_dir(), str) + + def test_get_flags(self): + assert hl._get_flags() == set() + assert list(hl._get_flags('use_new_shuffle')) == 'use_new_shuffle'