diff --git a/hail/python/hail/conftest.py b/hail/python/hail/conftest.py index a78bbca664b..386184378d9 100644 --- a/hail/python/hail/conftest.py +++ b/hail/python/hail/conftest.py @@ -44,6 +44,11 @@ def init(doctest_namespace): os.chdir(olddir) +@pytest.fixture(autouse=True) +def reset_randomness(init): + hl.reset_global_randomness() + + def generate_datasets(doctest_namespace): doctest_namespace['hl'] = hl doctest_namespace['np'] = np diff --git a/hail/python/test/hail/conftest.py b/hail/python/test/hail/conftest.py index da9464109ab..ed8f1ebce44 100644 --- a/hail/python/test/hail/conftest.py +++ b/hail/python/test/hail/conftest.py @@ -4,8 +4,9 @@ import pytest -from hail import current_backend +from hail import current_backend, init from hail.backend.service_backend import ServiceBackend +from .helpers import startTestHailContext, stopTestHailContext def pytest_collection_modifyitems(config, items): @@ -33,8 +34,15 @@ def ensure_event_loop_is_initialized_in_test_thread(): asyncio.set_event_loop(asyncio.new_event_loop()) +@pytest.fixture(scope="session", autouse=True) +def init_hail(): + startTestHailContext() + yield + stopTestHailContext() + + @pytest.fixture(autouse=True) -def set_query_name(request): +def set_query_name(init_hail, request): backend = current_backend() if isinstance(backend, ServiceBackend): backend.batch_attributes = dict(name=request.node.name) diff --git a/hail/python/test/hail/experimental/test_codec.py b/hail/python/test/hail/experimental/test_codec.py index 6a6405c1de1..8c7dfe44f71 100644 --- a/hail/python/test/hail/experimental/test_codec.py +++ b/hail/python/test/hail/experimental/test_codec.py @@ -1,9 +1,6 @@ import hail as hl from test.hail.helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - UNBLOCKED_UNBUFFERED_SPEC = '{"name":"StreamBufferSpec"}' diff --git a/hail/python/test/hail/experimental/test_experimental.py b/hail/python/test/hail/experimental/test_experimental.py index 245fdd9959b..bd7f6cdb8b6 100644 --- a/hail/python/test/hail/experimental/test_experimental.py +++ b/hail/python/test/hail/experimental/test_experimental.py @@ -5,9 +5,6 @@ from ..helpers import * from hail.utils import new_temp_file -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): @fails_service_backend() diff --git a/hail/python/test/hail/experimental/test_vcf_combiner.py b/hail/python/test/hail/experimental/test_vcf_combiner.py index d04650edab1..6cd293075b1 100644 --- a/hail/python/test/hail/experimental/test_vcf_combiner.py +++ b/hail/python/test/hail/experimental/test_vcf_combiner.py @@ -4,10 +4,7 @@ from hail.experimental.vcf_combiner import vcf_combiner as vc from hail.utils.java import Env from hail.utils.misc import new_temp_file -from ..helpers import resource, startTestHailContext, stopTestHailContext, fails_local_backend, fails_service_backend - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend all_samples = ['HG00308', 'HG00592', 'HG02230', 'NA18534', 'NA20760', diff --git a/hail/python/test/hail/expr/test_expr.py b/hail/python/test/hail/expr/test_expr.py index fe4766c5d14..60cd8449d47 100644 --- a/hail/python/test/hail/expr/test_expr.py +++ b/hail/python/test/hail/expr/test_expr.py @@ -11,9 +11,6 @@ import hail.ir as ir from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def _test_many_equal(test_cases): expressions = [t[0] for t in test_cases] diff --git a/hail/python/test/hail/expr/test_ndarrays.py b/hail/python/test/hail/expr/test_ndarrays.py index 1974be5f88c..24f9a6ed6e0 100644 --- a/hail/python/test/hail/expr/test_ndarrays.py +++ b/hail/python/test/hail/expr/test_ndarrays.py @@ -4,9 +4,6 @@ from hail.utils.java import FatalError, HailUserError -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def assert_ndarrays(asserter, exprs_and_expecteds): exprs, expecteds = zip(*exprs_and_expecteds) diff --git a/hail/python/test/hail/expr/test_show.py b/hail/python/test/hail/expr/test_show.py index dfb851bce02..d1acfc3bacd 100644 --- a/hail/python/test/hail/expr/test_show.py +++ b/hail/python/test/hail/expr/test_show.py @@ -1,11 +1,7 @@ -from ..helpers import startTestHailContext, stopTestHailContext import unittest import hail as hl -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test(self): diff --git a/hail/python/test/hail/expr/test_types.py b/hail/python/test/hail/expr/test_types.py index 7fc96e2ff02..9df0027b53c 100644 --- a/hail/python/test/hail/expr/test_types.py +++ b/hail/python/test/hail/expr/test_types.py @@ -5,9 +5,6 @@ from ..helpers import * from hail.utils.java import Env -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def types_to_test(self): diff --git a/hail/python/test/hail/fs/test_worker_driver_fs.py b/hail/python/test/hail/fs/test_worker_driver_fs.py index eda8d26e162..76e8d312ad8 100644 --- a/hail/python/test/hail/fs/test_worker_driver_fs.py +++ b/hail/python/test/hail/fs/test_worker_driver_fs.py @@ -1,11 +1,7 @@ import hail as hl -from ..helpers import startTestHailContext, stopTestHailContext from hailtop.utils import secret_alnum_string from hailtop.test_utils import skip_in_azure -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - @skip_in_azure def test_requester_pays_no_settings(): diff --git a/hail/python/test/hail/genetics/test_call.py b/hail/python/test/hail/genetics/test_call.py index 25d8f8ef2c1..63a0712a545 100644 --- a/hail/python/test/hail/genetics/test_call.py +++ b/hail/python/test/hail/genetics/test_call.py @@ -3,9 +3,6 @@ from hail.genetics import * from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_hom_ref(self): diff --git a/hail/python/test/hail/genetics/test_locus.py b/hail/python/test/hail/genetics/test_locus.py index b85ca96e4f8..ebf0491aeb3 100644 --- a/hail/python/test/hail/genetics/test_locus.py +++ b/hail/python/test/hail/genetics/test_locus.py @@ -4,9 +4,6 @@ from hail.genetics import * from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_constructor(self): diff --git a/hail/python/test/hail/genetics/test_pedigree.py b/hail/python/test/hail/genetics/test_pedigree.py index 53a194fdead..e42084b0ace 100644 --- a/hail/python/test/hail/genetics/test_pedigree.py +++ b/hail/python/test/hail/genetics/test_pedigree.py @@ -4,9 +4,6 @@ from ..helpers import * from hail.utils.java import FatalError -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/genetics/test_reference_genome.py b/hail/python/test/hail/genetics/test_reference_genome.py index c79438a6f15..1f3316ceea2 100644 --- a/hail/python/test/hail/genetics/test_reference_genome.py +++ b/hail/python/test/hail/genetics/test_reference_genome.py @@ -5,9 +5,6 @@ from ..helpers import * from hail.utils import FatalError -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/linalg/test_linalg.py b/hail/python/test/hail/linalg/test_linalg.py index 767fe2f331d..395ffa3ac9b 100644 --- a/hail/python/test/hail/linalg/test_linalg.py +++ b/hail/python/test/hail/linalg/test_linalg.py @@ -8,9 +8,6 @@ import math from hail.expr.expressions import ExpressionException -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def sparsify_numpy(np_mat, block_size, blocks_to_sparsify): n_rows, n_cols = np_mat.shape diff --git a/hail/python/test/hail/matrixtable/test_file_formats.py b/hail/python/test/hail/matrixtable/test_file_formats.py index 6488c3728e0..af3a0426d36 100644 --- a/hail/python/test/hail/matrixtable/test_file_formats.py +++ b/hail/python/test/hail/matrixtable/test_file_formats.py @@ -5,9 +5,6 @@ from hail.utils.java import Env, scala_object from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def create_backward_compatibility_files(): import os @@ -39,12 +36,12 @@ def test_write(): @pytest.fixture(scope="module") -def all_values_matrix_table_fixture(): +def all_values_matrix_table_fixture(init_hail): return create_all_values_matrix_table() @pytest.fixture(scope="module") -def all_values_table_fixture(): +def all_values_table_fixture(init_hail): return create_all_values_table() diff --git a/hail/python/test/hail/matrixtable/test_grouped_matrix_table.py b/hail/python/test/hail/matrixtable/test_grouped_matrix_table.py index 9c1a3d9e8b0..601f32773a2 100644 --- a/hail/python/test/hail/matrixtable/test_grouped_matrix_table.py +++ b/hail/python/test/hail/matrixtable/test_grouped_matrix_table.py @@ -3,9 +3,6 @@ import hail as hl from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/matrixtable/test_matrix_table.py b/hail/python/test/hail/matrixtable/test_matrix_table.py index 4ba125a01fe..71a195f2d58 100644 --- a/hail/python/test/hail/matrixtable/test_matrix_table.py +++ b/hail/python/test/hail/matrixtable/test_matrix_table.py @@ -10,9 +10,6 @@ from hail.utils.misc import new_temp_file from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def get_mt(self, min_partitions=None) -> hl.MatrixTable: diff --git a/hail/python/test/hail/methods/relatedness/test_identity_by_descent.py b/hail/python/test/hail/methods/relatedness/test_identity_by_descent.py index dfa7289bc3f..4259d25ff8b 100644 --- a/hail/python/test/hail/methods/relatedness/test_identity_by_descent.py +++ b/hail/python/test/hail/methods/relatedness/test_identity_by_descent.py @@ -4,11 +4,7 @@ import hail as hl import hail.utils as utils -from ...helpers import (startTestHailContext, stopTestHailContext, get_dataset, - fails_service_backend, fails_local_backend) - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ...helpers import get_dataset, fails_service_backend, fails_local_backend class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/methods/relatedness/test_pc_relate.py b/hail/python/test/hail/methods/relatedness/test_pc_relate.py index bea71723d2b..0cc52ee9a68 100644 --- a/hail/python/test/hail/methods/relatedness/test_pc_relate.py +++ b/hail/python/test/hail/methods/relatedness/test_pc_relate.py @@ -1,10 +1,7 @@ import hail as hl import hail.utils as utils -from ...helpers import (resource, startTestHailContext, stopTestHailContext, skip_when_service_backend) - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ...helpers import resource, skip_when_service_backend def test_pc_relate_against_R_truth(): diff --git a/hail/python/test/hail/methods/test_family_methods.py b/hail/python/test/hail/methods/test_family_methods.py index 445590148e3..47e7e66f1f0 100644 --- a/hail/python/test/hail/methods/test_family_methods.py +++ b/hail/python/test/hail/methods/test_family_methods.py @@ -3,9 +3,6 @@ import hail as hl from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_trio_matrix(self): diff --git a/hail/python/test/hail/methods/test_impex.py b/hail/python/test/hail/methods/test_impex.py index 8e8a3847698..9582fbe353a 100644 --- a/hail/python/test/hail/methods/test_impex.py +++ b/hail/python/test/hail/methods/test_impex.py @@ -14,9 +14,6 @@ from ..helpers import * from hail.utils import new_temp_file, FatalError, run_command, uri_path, HailUserError -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - _FLOAT_INFO_FIELDS = [ 'BaseQRankSum', 'ClippingRankSum', diff --git a/hail/python/test/hail/methods/test_king.py b/hail/python/test/hail/methods/test_king.py index 7da1e19b4cb..1e86a1ae563 100644 --- a/hail/python/test/hail/methods/test_king.py +++ b/hail/python/test/hail/methods/test_king.py @@ -1,10 +1,7 @@ import pytest import hail as hl -from ..helpers import resource, startTestHailContext, stopTestHailContext, fails_local_backend, fails_service_backend - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend def assert_c_king_same_as_hail_king(c_king_path, hail_king_mt): diff --git a/hail/python/test/hail/methods/test_misc.py b/hail/python/test/hail/methods/test_misc.py index 66739dff3ae..54f05951316 100644 --- a/hail/python/test/hail/methods/test_misc.py +++ b/hail/python/test/hail/methods/test_misc.py @@ -3,9 +3,6 @@ import hail as hl from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_rename_duplicates(self): diff --git a/hail/python/test/hail/methods/test_pca.py b/hail/python/test/hail/methods/test_pca.py index 9ca31b05722..4f63900d5a8 100644 --- a/hail/python/test/hail/methods/test_pca.py +++ b/hail/python/test/hail/methods/test_pca.py @@ -4,12 +4,7 @@ import hail as hl from hail.methods.pca import _make_tsm -from ..helpers import (resource, startTestHailContext, stopTestHailContext, fails_local_backend, - fails_service_backend, skip_when_service_backend) - - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend, skip_when_service_backend @fails_service_backend() diff --git a/hail/python/test/hail/methods/test_qc.py b/hail/python/test/hail/methods/test_qc.py index 2c374ca8cbd..517d72603c5 100644 --- a/hail/python/test/hail/methods/test_qc.py +++ b/hail/python/test/hail/methods/test_qc.py @@ -4,9 +4,6 @@ import hail.expr.aggregators as agg from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_sample_qc(self): diff --git a/hail/python/test/hail/methods/test_statgen.py b/hail/python/test/hail/methods/test_statgen.py index f9f69e949fb..4cc43500e8a 100644 --- a/hail/python/test/hail/methods/test_statgen.py +++ b/hail/python/test/hail/methods/test_statgen.py @@ -10,11 +10,7 @@ from hail.linalg import BlockMatrix from hail.utils import FatalError from hail.utils.java import choose_backend -from ..helpers import (startTestHailContext, stopTestHailContext, resource, - fails_local_backend, fails_service_backend) - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/table/test_grouped_table.py b/hail/python/test/hail/table/test_grouped_table.py index 74c0c99bffb..918e2afeba3 100644 --- a/hail/python/test/hail/table/test_grouped_table.py +++ b/hail/python/test/hail/table/test_grouped_table.py @@ -1,10 +1,6 @@ import unittest import hail as hl -from ..helpers import * - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext class GroupedTableTests(unittest.TestCase): diff --git a/hail/python/test/hail/table/test_table.py b/hail/python/test/hail/table/test_table.py index 635efa663ee..6881c1a2618 100644 --- a/hail/python/test/hail/table/test_table.py +++ b/hail/python/test/hail/table/test_table.py @@ -16,9 +16,6 @@ from ..helpers import * from test.hail.matrixtable.test_file_formats import create_all_values_datasets -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_annotate(self): diff --git a/hail/python/test/hail/test_context.py b/hail/python/test/hail/test_context.py index b2645ae9405..f71f6ba19d5 100644 --- a/hail/python/test/hail/test_context.py +++ b/hail/python/test/hail/test_context.py @@ -1,12 +1,8 @@ import unittest import hail as hl -from .helpers import startTestHailContext, stopTestHailContext, skip_unless_spark_backend, fails_local_backend, fails_service_backend from hail.utils.java import Env -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class Tests(unittest.TestCase): def test_init_hail_context_twice(self): diff --git a/hail/python/test/hail/test_ir.py b/hail/python/test/hail/test_ir.py index 1cbee6c0b0c..fbe3b659fc4 100644 --- a/hail/python/test/hail/test_ir.py +++ b/hail/python/test/hail/test_ir.py @@ -8,9 +8,6 @@ from hail.utils import new_temp_file from .helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - class ValueIRTests(unittest.TestCase): def value_irs_env(self): diff --git a/hail/python/test/hail/utils/test_google_fs_utils.py b/hail/python/test/hail/utils/test_google_fs_utils.py index 06133b53a78..2a7a45fc168 100644 --- a/hail/python/test/hail/utils/test_google_fs_utils.py +++ b/hail/python/test/hail/utils/test_google_fs_utils.py @@ -11,11 +11,6 @@ from hailtop.utils import secret_alnum_string from hailtop.config import get_remote_tmpdir from hail.utils.java import FatalError -from ..helpers import startTestHailContext, stopTestHailContext, _initialized - - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/utils/test_placement_tree.py b/hail/python/test/hail/utils/test_placement_tree.py index 1e52a2cf312..55c70bd68b9 100644 --- a/hail/python/test/hail/utils/test_placement_tree.py +++ b/hail/python/test/hail/utils/test_placement_tree.py @@ -3,10 +3,6 @@ import hail as hl from hail.utils.placement_tree import PlacementTree -from ..helpers import startTestHailContext, stopTestHailContext - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext class Tests(unittest.TestCase): diff --git a/hail/python/test/hail/utils/test_utils.py b/hail/python/test/hail/utils/test_utils.py index 95e98ee8bd6..e759d4901dd 100644 --- a/hail/python/test/hail/utils/test_utils.py +++ b/hail/python/test/hail/utils/test_utils.py @@ -9,9 +9,6 @@ from ..helpers import * -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def normalize_path(path: str) -> str: return hl.hadoop_stat(path)['path'] @@ -336,7 +333,7 @@ def test_json_encoder(self): @pytest.fixture(scope="module") -def glob_tests_directory(): +def glob_tests_directory(init_hail): with hl.TemporaryDirectory() as dirname: touch(dirname + '/abc/ghi/123') touch(dirname + '/abc/ghi/!23') @@ -362,16 +359,12 @@ def glob_tests_directory(): def test_hadoop_ls_folder_glob(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/123', glob_tests_directory + '/abc/jkl/123'] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/abc/*/123')] assert set(actual) == set(expected) def test_hadoop_ls_prefix_folder_glob_qmarks(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/78', glob_tests_directory + '/abc/jkl/78'] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/abc/*/??')] @@ -379,8 +372,6 @@ def test_hadoop_ls_prefix_folder_glob_qmarks(glob_tests_directory): def test_hadoop_ls_two_folder_globs(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/123', glob_tests_directory + '/abc/jkl/123', glob_tests_directory + '/def/ghi/123', @@ -390,8 +381,6 @@ def test_hadoop_ls_two_folder_globs(glob_tests_directory): def test_hadoop_ls_two_folder_globs_and_two_qmarks(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/78', glob_tests_directory + '/abc/jkl/78', glob_tests_directory + '/def/ghi/78', @@ -401,8 +390,6 @@ def test_hadoop_ls_two_folder_globs_and_two_qmarks(glob_tests_directory): def test_hadoop_ls_one_folder_glob_and_qmarks_in_multiple_components(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/78', glob_tests_directory + '/def/ghi/78'] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/*/?h?/??')] @@ -410,24 +397,18 @@ def test_hadoop_ls_one_folder_glob_and_qmarks_in_multiple_components(glob_tests_ def test_hadoop_ls_groups(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/123'] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/abc/[ghi][ghi]i/123')] assert set(actual) == set(expected) def test_hadoop_ls_size_one_groups(glob_tests_directory): - fs = hl.current_backend().fs - expected = [] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/abc/[h][g]i/123')] assert set(actual) == set(expected) def test_hadoop_ls_component_with_only_groups(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/123', glob_tests_directory + '/abc/ghi/!23', glob_tests_directory + '/abc/ghi/?23', @@ -438,8 +419,6 @@ def test_hadoop_ls_component_with_only_groups(glob_tests_directory): def test_hadoop_ls_negated_group(glob_tests_directory): - fs = hl.current_backend().fs - expected = [glob_tests_directory + '/abc/ghi/!23', glob_tests_directory + '/abc/ghi/?23'] actual = [x['path'] for x in hl.hadoop_ls(glob_tests_directory + '/abc/ghi/[!1]23')] diff --git a/hail/python/test/hail/vds/test_combiner.py b/hail/python/test/hail/vds/test_combiner.py index 46ab5b2e6b4..e8fdcb780a1 100644 --- a/hail/python/test/hail/vds/test_combiner.py +++ b/hail/python/test/hail/vds/test_combiner.py @@ -6,10 +6,7 @@ from hail.utils.misc import new_temp_file from hail.vds.combiner import combine_variant_datasets, new_combiner, load_combiner, transform_gvcf from hail.vds.combiner.combine import defined_entry_fields -from ..helpers import startTestHailContext, stopTestHailContext, resource, fails_local_backend, fails_service_backend - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend all_samples = ['HG00308', 'HG00592', 'HG02230', 'NA18534', 'NA20760', diff --git a/hail/python/test/hail/vds/test_vds.py b/hail/python/test/hail/vds/test_vds.py index 89b0a746b4e..2acbd9cc486 100644 --- a/hail/python/test/hail/vds/test_vds.py +++ b/hail/python/test/hail/vds/test_vds.py @@ -4,10 +4,7 @@ import hail as hl from hail.utils import new_temp_file from hail.vds.combiner.combine import defined_entry_fields -from ..helpers import startTestHailContext, stopTestHailContext, resource, fails_local_backend, fails_service_backend - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext +from ..helpers import resource, fails_local_backend, fails_service_backend # run this method to regenerate the combined VDS from 5 samples diff --git a/hail/python/test/hail/vds/test_vds_functions.py b/hail/python/test/hail/vds/test_vds_functions.py index b305d703b37..91706fdb82d 100644 --- a/hail/python/test/hail/vds/test_vds_functions.py +++ b/hail/python/test/hail/vds/test_vds_functions.py @@ -1,10 +1,5 @@ import hail as hl -from ..helpers import startTestHailContext, stopTestHailContext - -setUpModule = startTestHailContext -tearDownModule = stopTestHailContext - def test_lgt_to_gt(): call_0_0_f = hl.call(0, 0, phased=False) call_0_0_t = hl.call(0, 0, phased=True)