Skip to content

Commit

Permalink
RM-96 separate tests into classes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantimjohn committed Aug 18, 2023
1 parent 64affb0 commit 9bd0278
Showing 1 changed file with 55 additions and 33 deletions.
88 changes: 55 additions & 33 deletions tests/integration/records/single_db/test_records_unload.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,6 @@ class RecordsUnloadIntegrationTest(BaseRecordsIntegrationTest):
def tearDown(self):
...

def test_unload_csv_format(self):
self.unload_and_verify('delimited', 'csv')

def test_unload_csv_format_uncompressed(self):
self.unload_and_verify('delimited', 'csv', {'compression': None})

def test_unload_csv_format_without_header_row(self):
self.unload_and_verify('delimited', 'csv', {'header-row': False})

def test_unload_bluelabs_format(self):
self.unload_and_verify('delimited', 'bluelabs')

def test_unload_bluelabs_format_uncompressed(self):
self.unload_and_verify('delimited', 'bluelabs', {'compression': None})

def test_unload_bluelabs_format_with_header_row(self):
self.unload_and_verify('delimited', 'bluelabs', {'header-row': True})

def test_unload_vertica_format(self):
self.unload_and_verify('delimited', 'vertica')

def test_unload_vertica_format_with_header_row(self):
self.unload_and_verify('delimited', 'vertica', {'header-row': True})

def test_unload_bigquery_format(self):
self.unload_and_verify('delimited', 'bigquery')

def test_unload_bigquery_format_uncompressed(self):
self.unload_and_verify('delimited', 'bigquery', {'compression': None})

def test_unload_bigquery_format_without_header_row(self):
self.unload_and_verify('delimited', 'bigquery', {'header-row': False})

def requires_pandas(self, format_type, variant, hints):
# Return true if the database requires pandas to be able to
# export the given format and variant
Expand Down Expand Up @@ -89,3 +56,58 @@ def verify_records_directory(self, format_type, variant, tempdir, hints={}) -> N
hints),
self.engine.name)
validator.validate()


class UnloaCsvFormatTest(RecordsUnloadIntegrationTest):
def test_unload_csv_format(self):
self.unload_and_verify('delimited', 'csv')


class UnloadCsvFormatUncompressedTest(RecordsUnloadIntegrationTest):
def test_unload_csv_format_uncompressed(self):
self.unload_and_verify('delimited', 'csv', {'compression': None})


class UnloadCsvFormatWithoutHeaderRowTest(RecordsUnloadIntegrationTest):
def test_unload_csv_format_without_header_row(self):
self.unload_and_verify('delimited', 'csv', {'header-row': False})


class UnloadBluelabsFormatTest(RecordsUnloadIntegrationTest):
def test_unload_bluelabs_format(self):
self.unload_and_verify('delimited', 'bluelabs')


class unload_bluelabs_format_uncompressedTest(RecordsUnloadIntegrationTest):
def test_unload_bluelabs_format_uncompressed(self):
self.unload_and_verify('delimited', 'bluelabs', {'compression': None})


class UnloadBluelabsFormatWithHeaderRowTest(RecordsUnloadIntegrationTest):
def test_unload_bluelabs_format_with_header_row(self):
self.unload_and_verify('delimited', 'bluelabs', {'header-row': True})


class UnloadVerticaFormatTest(RecordsUnloadIntegrationTest):
def test_unload_vertica_format(self):
self.unload_and_verify('delimited', 'vertica')


class UnloadVerticaFormatWithHeaderRowTest(RecordsUnloadIntegrationTest):
def test_unload_vertica_format_with_header_row(self):
self.unload_and_verify('delimited', 'vertica', {'header-row': True})


class UnloadBigqueryFormatTest(RecordsUnloadIntegrationTest):
def test_unload_bigquery_format(self):
self.unload_and_verify('delimited', 'bigquery')


class UnloadBigqueryFormatUncompressedTest(RecordsUnloadIntegrationTest):
def test_unload_bigquery_format_uncompressed(self):
self.unload_and_verify('delimited', 'bigquery', {'compression': None})


class UnloadBigqueryFormatWithoutHeaderRowTest(RecordsUnloadIntegrationTest):
def test_unload_bigquery_format_without_header_row(self):
self.unload_and_verify('delimited', 'bigquery', {'header-row': False})

0 comments on commit 9bd0278

Please sign in to comment.