Skip to content

Commit

Permalink
format via black and add installation of dev deps to contributing docs (
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmacnamararseg authored Apr 7, 2024
1 parent 350eea7 commit b58fd59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can create a virtual environment using ``conda`` and install the development
```bash
$ conda create -n adlfs-dev python=3.8
$ conda activate adlfs-dev
$ pip install -r requirements/latest.txt
$ pip install -r requirements/latest.txt -r requirements.dev
```

You can run tests from the main directory as follows:
Expand Down
9 changes: 6 additions & 3 deletions adlfs/tests/test_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ def test_rm_recursive(mock_delete_blob, storage):
mock.ANY, "root/c"
), "The directory deletion should be the last call"


@pytest.mark.filterwarnings("error")
def test_rm_recursive2(storage):
fs = AzureBlobFileSystem(
Expand All @@ -771,14 +772,16 @@ def test_rm_recursive2(storage):
async def test_rm_recursive_call_order(storage, mocker):
from azure.storage.blob.aio import ContainerClient

delete_blob_mock = mocker.patch.object(ContainerClient, "delete_blob", return_value=None)
delete_blob_mock = mocker.patch.object(
ContainerClient, "delete_blob", return_value=None
)
fs = AzureBlobFileSystem(
account_name=storage.account_name, connection_string=CONN_STR
)

container_name = "data"
file_paths = [
"root/a",
"root/a",
"root/a/file.txt",
"root/a1",
"root/a1/file1.txt",
Expand All @@ -793,7 +796,7 @@ async def test_rm_recursive_call_order(storage, mocker):
"root/e+f",
"root/e+f/file1.txt",
"root/e+f/file2.txt",
"root/rfile.txt"
"root/rfile.txt",
]
await fs._rm_files(container_name=container_name, file_paths=file_paths)
last_deleted_paths = [call.args[0] for call in delete_blob_mock.call_args_list[-7:]]
Expand Down

0 comments on commit b58fd59

Please sign in to comment.