Skip to content

Commit

Permalink
Revert "Disable generation of hyperd.log (#292)" (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jun 11, 2024
1 parent b3c06a7 commit b165610
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
1 change: 0 additions & 1 deletion newsfragments/291.fix

This file was deleted.

3 changes: 1 addition & 2 deletions src/pantab/_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def frames_from_hyper(

table_names = []
with tempfile.TemporaryDirectory() as tmp_dir, tab_api.HyperProcess(
tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU,
parameters={"log_config": ""},
tab_api.Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU
) as hpe:
tmp_db = shutil.copy(source, tmp_dir)
with tab_api.Connection(hpe.endpoint, tmp_db) as connection:
Expand Down
14 changes: 0 additions & 14 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pathlib

import pandas as pd
import pandas.testing as tm
import tableauhyperapi as tab_api
Expand Down Expand Up @@ -130,15 +128,3 @@ def test_reader_handles_duplicate_columns(tmp_hyper):

df = pt.frame_from_hyper_query(tmp_hyper, "SELECT 1 as col, 2 AS col, 3 AS col")
assert df.columns.tolist() == ["col", "col_1", "col_2"]


def test_frame_from_hyper_doesnt_generate_hyperd_log(frame, tmp_hyper):
pt.frame_to_hyper(frame, tmp_hyper, table="test")
pt.frame_from_hyper(tmp_hyper, table="test")
assert not pathlib.Path("hyperd.log").is_file()


def test_frames_from_hyper_doesnt_generate_hyperd_log(frame, tmp_hyper):
pt.frame_to_hyper(frame, tmp_hyper, table="test")
pt.frames_from_hyper(tmp_hyper)
assert not pathlib.Path("hyperd.log").is_file()

0 comments on commit b165610

Please sign in to comment.