Skip to content

Commit

Permalink
Remove unnecessary fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoebus Mak authored and Phoebus Mak committed Sep 25, 2023
1 parent 110bfc4 commit 9c3c291
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,9 @@ def azurite_container():
return container


def temp_folder():
return tempfile.TemporaryDirectory()


@pytest.fixture(scope="module")
def temp_cert(temp_folder):
def temp_cert():
temp_folder = tempfile.TemporaryDirectory()
key_file = f"{temp_folder.name}/key.pem"
cert_file = f"{temp_folder.name}/cert.pem"
client_cert_file = f"{temp_folder.name}/client.pem"
Expand All @@ -781,7 +778,10 @@ def spawn_azurite(azurite_port, temp_cert):
key_file, cert_file, _ = temp_cert
try: # Awaiting fix for cleanup in windows file-in-use problem
p = subprocess.Popen(
f"azurite --silent --blobPort {azurite_port} --blobHost 127.0.0.1 --queuePort 0 --tablePort 0 --key {key_file} --cert {cert_file}",
{
f"azurite --silent --blobPort {azurite_port} --blobHost 127.0.0.1 --queuePort 0 --tablePort 0 --key"
f" {key_file} --cert {cert_file}"
}
cwd=temp_folder.name,
shell=True,
)
Expand Down

0 comments on commit 9c3c291

Please sign in to comment.