-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
csv dest: add improved error handling in tests
- Loading branch information
Showing
2 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import csv | ||
import gzip | ||
import json | ||
import logging | ||
import os | ||
import tempfile | ||
from typing import List | ||
|
||
import pyarrow.parquet | ||
import pyarrow.parquet # type: ignore | ||
import pytest | ||
from loader import load_dlt_file | ||
|
||
from ingestr.src.loader import load_dlt_file | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
TESTDATA = [ | ||
{"name": "Jhon", "email": "[email protected]"}, | ||
|
@@ -57,7 +61,10 @@ def testfiles(): | |
yield files | ||
|
||
for file in files: | ||
os.remove(file) | ||
try: | ||
os.remove(file) | ||
except Exception as e: | ||
logger.error(f"error removing temporary file {file}", exc_info=e) | ||
|
||
|
||
def test_loader(testfiles): | ||
|