From b596203ecb922ef936edc59aa82ae294818fa7c0 Mon Sep 17 00:00:00 2001 From: Tim Ryan Date: Fri, 18 Aug 2023 11:47:15 -0400 Subject: [PATCH] RM-96 bring teardown into method --- .../records/single_db/test_records_unload.py | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/integration/records/single_db/test_records_unload.py b/tests/integration/records/single_db/test_records_unload.py index ece340c85..1e1f9900a 100644 --- a/tests/integration/records/single_db/test_records_unload.py +++ b/tests/integration/records/single_db/test_records_unload.py @@ -12,8 +12,7 @@ class RecordsUnloadIntegrationTest(BaseRecordsIntegrationTest): def tearDown(self): - close_all_sessions() - self.engine.dispose() + ... def requires_pandas(self, format_type, variant, hints): # Return true if the database requires pandas to be able to @@ -63,53 +62,75 @@ def verify_records_directory(self, format_type, variant, tempdir, hints={}) -> N class UnloaCsvFormatTest(RecordsUnloadIntegrationTest): def test_unload_csv_format(self): self.unload_and_verify('delimited', 'csv') + close_all_sessions() + self.engine.dispose() class UnloadCsvFormatUncompressedTest(RecordsUnloadIntegrationTest): def test_unload_csv_format_uncompressed(self): self.unload_and_verify('delimited', 'csv', {'compression': None}) + close_all_sessions() + self.engine.dispose() class UnloadCsvFormatWithoutHeaderRowTest(RecordsUnloadIntegrationTest): def test_unload_csv_format_without_header_row(self): self.unload_and_verify('delimited', 'csv', {'header-row': False}) + close_all_sessions() + self.engine.dispose() class UnloadBluelabsFormatTest(RecordsUnloadIntegrationTest): def test_unload_bluelabs_format(self): self.unload_and_verify('delimited', 'bluelabs') + close_all_sessions() + self.engine.dispose() class unload_bluelabs_format_uncompressedTest(RecordsUnloadIntegrationTest): def test_unload_bluelabs_format_uncompressed(self): self.unload_and_verify('delimited', 'bluelabs', {'compression': None}) + close_all_sessions() + self.engine.dispose() class UnloadBluelabsFormatWithHeaderRowTest(RecordsUnloadIntegrationTest): def test_unload_bluelabs_format_with_header_row(self): self.unload_and_verify('delimited', 'bluelabs', {'header-row': True}) + close_all_sessions() + self.engine.dispose() class UnloadVerticaFormatTest(RecordsUnloadIntegrationTest): def test_unload_vertica_format(self): self.unload_and_verify('delimited', 'vertica') + close_all_sessions() + self.engine.dispose() class UnloadVerticaFormatWithHeaderRowTest(RecordsUnloadIntegrationTest): def test_unload_vertica_format_with_header_row(self): self.unload_and_verify('delimited', 'vertica', {'header-row': True}) + close_all_sessions() + self.engine.dispose() class UnloadBigqueryFormatTest(RecordsUnloadIntegrationTest): def test_unload_bigquery_format(self): self.unload_and_verify('delimited', 'bigquery') + close_all_sessions() + self.engine.dispose() class UnloadBigqueryFormatUncompressedTest(RecordsUnloadIntegrationTest): def test_unload_bigquery_format_uncompressed(self): self.unload_and_verify('delimited', 'bigquery', {'compression': None}) + close_all_sessions() + self.engine.dispose() class UnloadBigqueryFormatWithoutHeaderRowTest(RecordsUnloadIntegrationTest): def test_unload_bigquery_format_without_header_row(self): self.unload_and_verify('delimited', 'bigquery', {'header-row': False}) + close_all_sessions() + self.engine.dispose()