File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ dependencies = [
2828 " scooby>=0.5.12" ,
2929 " appdirs>=1.4.4" ,
3030 " typing-extensions>=4.5.0" ,
31+ " requests>=2.32.4" ,
3132]
3233
3334[project .optional-dependencies ]
Original file line number Diff line number Diff line change 2424from pathlib import Path
2525
2626import pytest
27+ import requests
2728
2829from ansys .tools .common .example_download import download_manager
2930
@@ -34,14 +35,14 @@ def test_download():
3435 directory = "pymapdl/cfx_mapping"
3536
3637 # Download the file
37- local_path = download_manager .download_file (filename , directory )
38-
39- assert Path .is_file (local_path )
38+ local_path_str = download_manager .download_file (filename , directory )
39+ local_path = Path ( local_path_str )
40+ assert local_path .is_file ()
4041
4142 # Check that file is cached
4243 local_path2 = download_manager .download_file (filename , directory )
4344
44- assert local_path2 == local_path
45+ assert local_path2 == local_path_str
4546
4647 download_manager .clear_download_cache ()
4748
@@ -54,7 +55,7 @@ def test_non_existent_file():
5455 directory = "pymapdl/cfx_mapping"
5556
5657 # Attempt to download the non-existent file
57- with pytest .raises (FileNotFoundError ):
58+ with pytest .raises (requests . exceptions . HTTPError ):
5859 download_manager .download_file (filename , directory )
5960
6061
You can’t perform that action at this time.
0 commit comments