@@ -723,25 +723,19 @@ def test_read_from_http_url(self, ext):
723
723
local_table = self .get_exceldf ('test1' , ext )
724
724
tm .assert_frame_equal (url_table , local_table )
725
725
726
- @td .skip_if_no ("s3fs" )
727
726
@td .skip_if_not_us_locale
728
- def test_read_from_s3_url (self , ext ):
729
- moto = pytest .importorskip ("moto" )
730
- boto3 = pytest .importorskip ("boto3" )
731
-
732
- with moto .mock_s3 ():
733
- conn = boto3 .resource ("s3" , region_name = "us-east-1" )
734
- conn .create_bucket (Bucket = "pandas-test" )
735
- file_name = os .path .join (self .dirpath , 'test1' + ext )
736
-
737
- with open (file_name , "rb" ) as f :
738
- conn .Bucket ("pandas-test" ).put_object (Key = "test1" + ext ,
739
- Body = f )
740
-
741
- url = ('s3://pandas-test/test1' + ext )
742
- url_table = read_excel (url )
743
- local_table = self .get_exceldf ('test1' , ext )
744
- tm .assert_frame_equal (url_table , local_table )
727
+ def test_read_from_s3_url (self , ext , s3_resource ):
728
+ # Bucket "pandas-test" created in tests/io/conftest.py
729
+ file_name = os .path .join (self .dirpath , 'test1' + ext )
730
+
731
+ with open (file_name , "rb" ) as f :
732
+ s3_resource .Bucket ("pandas-test" ).put_object (Key = "test1" + ext ,
733
+ Body = f )
734
+
735
+ url = ('s3://pandas-test/test1' + ext )
736
+ url_table = read_excel (url )
737
+ local_table = self .get_exceldf ('test1' , ext )
738
+ tm .assert_frame_equal (url_table , local_table )
745
739
746
740
@pytest .mark .slow
747
741
# ignore warning from old xlrd
0 commit comments