From 50871fd77cea157cbd3e96a5b468b3b03748ccc4 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 19 Aug 2026 12:43:35 -0700 Subject: [PATCH 1/2] added schedule for cleanup to created table --- .../integration/synapseclient/deprecated/test_tables.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/integration/synapseclient/deprecated/test_tables.py b/tests/integration/synapseclient/deprecated/test_tables.py index 7cc560177..dc3e886cd 100644 --- a/tests/integration/synapseclient/deprecated/test_tables.py +++ b/tests/integration/synapseclient/deprecated/test_tables.py @@ -352,7 +352,7 @@ def test_tables_csv(syn, project): # @skip("Skip integration tests for soon to be removed code") -def test_tables_pandas(syn, project): +def test_tables_pandas(syn, project, schedule_for_cleanup): # create a pandas DataFrame df = pd.DataFrame( { @@ -380,11 +380,16 @@ def test_tables_pandas(syn, project): cols = as_table_columns(df) cols[0].maximumSize = 20 - schema = Schema(name="Nifty Table", columns=cols, parent=project) + # Use a unique name so reruns via pytest-rerunfailures create a fresh table + # instead of appending rows to the table left by a previous attempt (SYNPY-1905) + schema = Schema( + name="Nifty Table " + str(uuid.uuid4()), columns=cols, parent=project + ) # store in Synapse # datetime64 column in df also gets changed from date time to epoch time. table = syn.store(Table(schema, df)) + schedule_for_cleanup(table.schema.id) # retrieve the table and verify results = syn.tableQuery("select * from %s" % table.schema.id, resultsAs="csv") From 0a1ff31c3fe81a7f1119cb8a1914f94048792d8a Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 19 Aug 2026 12:45:55 -0700 Subject: [PATCH 2/2] remove uneeded comment --- tests/integration/synapseclient/deprecated/test_tables.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/synapseclient/deprecated/test_tables.py b/tests/integration/synapseclient/deprecated/test_tables.py index dc3e886cd..9e81b9a15 100644 --- a/tests/integration/synapseclient/deprecated/test_tables.py +++ b/tests/integration/synapseclient/deprecated/test_tables.py @@ -380,8 +380,7 @@ def test_tables_pandas(syn, project, schedule_for_cleanup): cols = as_table_columns(df) cols[0].maximumSize = 20 - # Use a unique name so reruns via pytest-rerunfailures create a fresh table - # instead of appending rows to the table left by a previous attempt (SYNPY-1905) + schema = Schema( name="Nifty Table " + str(uuid.uuid4()), columns=cols, parent=project )