Skip to content

Commit 940e22f

Browse files
author
Max Wang
committed
black formatting
1 parent f605c97 commit 940e22f

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

tests/unit/test_client_dataframe.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ def test_create_empty_dataframe(self):
189189

190190
def test_create_drops_nan_values(self):
191191
"""NaN/None values are omitted from the create payload."""
192-
df = pd.DataFrame([
193-
{"name": "Contoso", "telephone1": "555-0100"},
194-
{"name": "Fabrikam", "telephone1": None},
195-
])
192+
df = pd.DataFrame(
193+
[
194+
{"name": "Contoso", "telephone1": "555-0100"},
195+
{"name": "Fabrikam", "telephone1": None},
196+
]
197+
)
196198
self.client._odata._create_multiple.return_value = ["guid-1", "guid-2"]
197199
self.client._odata._entity_set_from_schema_name.return_value = "accounts"
198200

@@ -278,10 +280,12 @@ def test_update_multiple_change_columns(self):
278280

279281
def test_update_skips_nan_by_default(self):
280282
"""NaN/None values are skipped by default (field left unchanged on server)."""
281-
df = pd.DataFrame([
282-
{"accountid": "guid-1", "name": "New Name", "telephone1": None},
283-
{"accountid": "guid-2", "name": None, "telephone1": "555-0200"},
284-
])
283+
df = pd.DataFrame(
284+
[
285+
{"accountid": "guid-1", "name": "New Name", "telephone1": None},
286+
{"accountid": "guid-2", "name": None, "telephone1": "555-0200"},
287+
]
288+
)
285289

286290
self.client.update_dataframe("account", df, id_column="accountid")
287291

@@ -292,10 +296,12 @@ def test_update_skips_nan_by_default(self):
292296

293297
def test_update_clear_nulls_sends_none(self):
294298
"""With clear_nulls=True, NaN/None values are sent as None to clear fields."""
295-
df = pd.DataFrame([
296-
{"accountid": "guid-1", "name": "New Name", "telephone1": None},
297-
{"accountid": "guid-2", "name": None, "telephone1": "555-0200"},
298-
])
299+
df = pd.DataFrame(
300+
[
301+
{"accountid": "guid-1", "name": "New Name", "telephone1": None},
302+
{"accountid": "guid-2", "name": None, "telephone1": "555-0200"},
303+
]
304+
)
299305

300306
self.client.update_dataframe("account", df, id_column="accountid", clear_nulls=True)
301307

0 commit comments

Comments
 (0)