@@ -11,7 +11,9 @@ def test_external_put(schema_ext, mock_stores, mock_cache):
1111 """
1212 external storage put and get and remove
1313 """
14- ext = ExternalTable (schema_ext .connection , store = "raw" , database = schema_ext .database )
14+ ext = ExternalTable (
15+ schema_ext .connection , store = "raw" , database = schema_ext .database
16+ )
1517 initial_length = len (ext )
1618 input_ = np .random .randn (3 , 7 , 8 )
1719 count = 7
@@ -30,14 +32,15 @@ def test_external_put(schema_ext, mock_stores, mock_cache):
3032
3133
3234class TestLeadingSlash :
33-
3435 def test_s3_leading_slash (self , schema_ext , mock_stores , mock_cache , minio_client ):
3536 """
3637 s3 external storage configured with leading slash
3738 """
3839 self ._leading_slash (schema_ext , index = 100 , store = "share" )
3940
40- def test_file_leading_slash (self , schema_ext , mock_stores , mock_cache , minio_client ):
41+ def test_file_leading_slash (
42+ self , schema_ext , mock_stores , mock_cache , minio_client
43+ ):
4144 """
4245 File external storage configured with leading slash
4346 """
@@ -50,42 +53,58 @@ def _leading_slash(self, schema_ext, index, store):
5053 id = index
5154 dj .config ["stores" ][store ]["location" ] = "leading/slash/test"
5255 SimpleRemote .insert ([{"simple" : id , "item" : value }])
53- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
56+ assert np .array_equal (
57+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
58+ )
5459
5560 id = index + 1
5661 dj .config ["stores" ][store ]["location" ] = "/leading/slash/test"
5762 SimpleRemote .insert ([{"simple" : id , "item" : value }])
58- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
63+ assert np .array_equal (
64+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
65+ )
5966
6067 id = index + 2
6168 dj .config ["stores" ][store ]["location" ] = "leading\\ slash\\ test"
6269 SimpleRemote .insert ([{"simple" : id , "item" : value }])
63- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
70+ assert np .array_equal (
71+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
72+ )
6473
6574 id = index + 3
6675 dj .config ["stores" ][store ]["location" ] = "f:\\ leading\\ slash\\ test"
6776 SimpleRemote .insert ([{"simple" : id , "item" : value }])
68- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
77+ assert np .array_equal (
78+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
79+ )
6980
7081 id = index + 4
7182 dj .config ["stores" ][store ]["location" ] = "f:\\ leading/slash\\ test"
7283 SimpleRemote .insert ([{"simple" : id , "item" : value }])
73- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
84+ assert np .array_equal (
85+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
86+ )
7487
7588 id = index + 5
7689 dj .config ["stores" ][store ]["location" ] = "/"
7790 SimpleRemote .insert ([{"simple" : id , "item" : value }])
78- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
91+ assert np .array_equal (
92+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
93+ )
7994
8095 id = index + 6
8196 dj .config ["stores" ][store ]["location" ] = "C:\\ "
8297 SimpleRemote .insert ([{"simple" : id , "item" : value }])
83- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
98+ assert np .array_equal (
99+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
100+ )
84101
85102 id = index + 7
86103 dj .config ["stores" ][store ]["location" ] = ""
87104 SimpleRemote .insert ([{"simple" : id , "item" : value }])
88- assert np .array_equal (value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" ))
105+ assert np .array_equal (
106+ value , (SimpleRemote & "simple={}" .format (id )).fetch1 ("item" )
107+ )
89108
90109 dj .config ["stores" ][store ]["location" ] = oldConfig
91110
0 commit comments