Skip to content

Commit 019a093

Browse files
committed
Add to upload test, test file is an actual geocsv
1 parent ecbce37 commit 019a093

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed

lib/galaxy_test/api/test_tools_upload.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,16 @@ def test_csv_upload(self):
220220
csv_metadata = self._upload_and_get_details(fh, file_type="csv")
221221
assert csv_metadata["file_ext"] == "csv"
222222

223-
@skip_without_datatype("csv")
223+
@skip_without_datatype("geocsv")
224224
def test_csv_upload_auto(self):
225225
csv_path = TestDataResolver().get_filename("1.csv")
226+
with open(csv_path, "rb") as fh:
227+
csv_metadata = self._upload_and_get_details(fh, file_type="auto")
228+
assert csv_metadata["file_ext"] == "geocsv"
229+
230+
@skip_without_datatype("csv")
231+
def test_csv_upload_auto(self):
232+
csv_path = TestDataResolver().get_filename("2.csv")
226233
with open(csv_path, "rb") as fh:
227234
csv_metadata = self._upload_and_get_details(fh, file_type="auto")
228235
assert csv_metadata["file_ext"] == "csv"
@@ -236,7 +243,7 @@ def test_csv_fetch(self):
236243

237244
@skip_without_datatype("csv")
238245
def test_csv_sniff_fetch(self):
239-
csv_path = TestDataResolver().get_filename("1.csv")
246+
csv_path = TestDataResolver().get_filename("2.csv")
240247
with open(csv_path, "rb") as fh:
241248
csv_metadata = self._upload_and_get_details(fh, api="fetch", ext="auto", to_posix_lines=True)
242249
assert csv_metadata["file_ext"] == "csv"

test-data/2.csv

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
x,y,z
2+
1,1,0.437968019160843
3+
1,2,0.746399640634157
4+
1,3,0.0267063149249279
5+
1,4,0.0216213331527797
6+
1,5,0.146060467736947
7+
1,6,0.359408541898084
8+
1,7,0.23314402740225
9+
2,1,0.599467114821971
10+
2,2,0.0615808215992003
11+
2,3,0.899292109588845
12+
2,4,0.512108580836541
13+
2,5,0.683834724089561
14+
2,6,0.333687966380965
15+
2,7,0.208395624246233
16+
3,1,0.746287037576455
17+
3,2,0.132904250575855
18+
3,3,0.878417734266683
19+
3,4,0.27849896674744
20+
3,5,0.777319029662675
21+
3,6,0.0968161570071586
22+
3,7,0.647062774580836
23+
4,1,0.990873271705157
24+
4,2,0.111363086771885
25+
4,3,0.638036284489945
26+
4,4,0.818292863324447
27+
4,5,0.231287184097297
28+
4,6,0.215988764386662
29+
4,7,0.844634212908857
30+
5,1,0.236484382010452
31+
5,2,0.139939845504822
32+
5,3,0.445616484010702
33+
5,4,0.857716433763033
34+
5,5,0.140349502322378
35+
5,6,0.337393815980143
36+
5,7,0.818238760388669
37+
6,1,0.0727632473629736
38+
6,2,0.598577196038044
39+
6,3,0.417003032537749
40+
6,4,0.0895011503328991
41+
6,5,0.663942941935459
42+
6,6,0.147597715837407
43+
6,7,0.129580399234519
44+
7,1,0.0823573267588806
45+
7,2,0.355784926669365
46+
7,3,0.163796151702189
47+
7,4,0.0850124025401227
48+
7,5,0.986506481603429
49+
7,6,0.288025022469386
50+
7,7,0.0571390507936172

0 commit comments

Comments
 (0)