Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
xiangyan99 committed Feb 5, 2024
commit 6f462a3f82fa1bb9cbf9ec2ce22082665d643f4c
5 changes: 3 additions & 2 deletions sdk/identity/azure-identity/tests/test_pickling.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import pickle
from azure.identity import DefaultAzureCredential


def test_pickle_dac():
cred = DefaultAzureCredential()
with open('data.pkl', 'wb') as outfile:
with open("data.pkl", "wb") as outfile:
pickle.dump(cred, outfile)
with open('data.pkl', 'rb') as infile:
with open("data.pkl", "rb") as infile:
data_loaded = pickle.load(infile)
5 changes: 3 additions & 2 deletions sdk/identity/azure-identity/tests/test_pickling_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import pickle
from azure.identity.aio import DefaultAzureCredential


def test_pickle_dac():
cred = DefaultAzureCredential()
with open('data_aio.pkl', 'wb') as outfile:
with open("data_aio.pkl", "wb") as outfile:
pickle.dump(cred, outfile)
with open('data_aio.pkl', 'rb') as infile:
with open("data_aio.pkl", "rb") as infile:
data_loaded = pickle.load(infile)