Skip to content

Commit

Permalink
Report env vars in pytest output
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Nov 22, 2024
1 parent e48d706 commit 1b5522d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target_postgres/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ def _do_copy(
for column in columns
}

raise NotImplementedError("This method is not implemented yet.")

# Use copy to run the copy statement.
# https://www.psycopg.org/psycopg3/docs/basic/copy.html
with connection.connection.cursor().copy(copy_statement) as copy: # type: ignore[attr-defined]
Expand All @@ -172,6 +170,8 @@ def _do_copy(

copy.write_row(processed_row)

raise NotImplementedError("This method is not implemented yet.")

def bulk_insert_records( # type: ignore[override]
self,
table: sa.Table,
Expand Down
8 changes: 8 additions & 0 deletions target_postgres/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Configuration for pytest."""

import os


def pytest_report_header():
"""Add environment variables to the pytest report header."""
return [f"{var}: value" for var in os.environ if var.startswith("TARGET_POSTGRES")]

0 comments on commit 1b5522d

Please sign in to comment.