Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Autopep fixes
  • Loading branch information
ccrook authored and nyalldawson committed Jul 19, 2018
1 parent 9488d14 commit 3be864e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 28 deletions.
6 changes: 3 additions & 3 deletions tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -337,7 +337,7 @@ def printWanted(self, testname, result):
print((prefix + ' ' + repr(msg) + ','))
print((prefix + ' ]'))
print(' return wanted')
print('',flush=True)
print('', flush=True)

def recordDifference(self, record1, record2):
# Compare a record defined as a dictionary
Expand Down Expand Up @@ -804,7 +804,7 @@ def test_040_issue_14666(self):
params = {'yField': 'y', 'xField': 'x', 'type': 'csv', 'delimiter': '\\t'}
requests = None
self.runTest(filename, requests, **params)

def test_041_no_detect_type(self):
# CSV file parsing
# Skip lines
Expand All @@ -816,7 +816,7 @@ def test_041_no_detect_type(self):
def test_042_no_detect_types_csvt(self):
# CSVT field types
filename = 'testcsvt.csv'
params = {'geomType': 'none', 'type': 'csv', 'detectTypes': 'no' }
params = {'geomType': 'none', 'type': 'csv', 'detectTypes': 'no'}
requests = None
self.runTest(filename, requests, **params)

Expand Down
51 changes: 26 additions & 25 deletions tests/src/python/test_qgsdelimitedtextprovider_wanted.py
Expand Up @@ -2450,12 +2450,13 @@ def test_040_issue_14666():
]
return wanted


def test_041_no_detect_type():
wanted={}
wanted['uri']='file://testtypes.csv?yField=lat&xField=lon&type=csv&detectTypes=no'
wanted['fieldTypes']=['text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text']
wanted['geometryType']=0
wanted['data']={
wanted = {}
wanted['uri'] = 'file://testtypes.csv?yField=lat&xField=lon&type=csv&detectTypes=no'
wanted['fieldTypes'] = ['text', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text']
wanted['geometryType'] = 0
wanted['data'] = {
2: {
'id': 'line1',
'description': '1.0',
Expand All @@ -2469,7 +2470,7 @@ def test_041_no_detect_type():
'text2': '1',
'#fid': 2,
'#geometry': 'Point (1 1)',
},
},
3: {
'id': 'line2',
'description': '1.0',
Expand All @@ -2483,7 +2484,7 @@ def test_041_no_detect_type():
'text2': '-4',
'#fid': 3,
'#geometry': 'Point (1 5)',
},
},
4: {
'id': 'line3',
'description': '5.0',
Expand All @@ -2497,7 +2498,7 @@ def test_041_no_detect_type():
'text2': '1x',
'#fid': 4,
'#geometry': 'Point (5 5)',
},
},
5: {
'id': 'line4',
'description': '5.0',
Expand All @@ -2511,7 +2512,7 @@ def test_041_no_detect_type():
'text2': 'NULL',
'#fid': 5,
'#geometry': 'Point (5 1)',
},
},
6: {
'id': 'line5',
'description': '3.0',
Expand All @@ -2525,7 +2526,7 @@ def test_041_no_detect_type():
'text2': '23',
'#fid': 6,
'#geometry': 'Point (3 1)',
},
},
7: {
'id': 'line6',
'description': '1.0',
Expand All @@ -2539,18 +2540,19 @@ def test_041_no_detect_type():
'text2': '0',
'#fid': 7,
'#geometry': 'Point (1 3)',
},
}
wanted['log']=[
]
},
}
wanted['log'] = [
]
return wanted


def test_042_no_detect_types_csvt():
wanted={}
wanted['uri']='file://testcsvt.csv?geomType=none&type=csv&detectTypes=no'
wanted['fieldTypes']=['integer', 'text', 'integer', 'double', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text']
wanted['geometryType']=4
wanted['data']={
wanted = {}
wanted['uri'] = 'file://testcsvt.csv?geomType=none&type=csv&detectTypes=no'
wanted['fieldTypes'] = ['integer', 'text', 'integer', 'double', 'text', 'text', 'text', 'text', 'text', 'text', 'text', 'text']
wanted['geometryType'] = 4
wanted['data'] = {
2: {
'id': '1',
'description': 'Test csvt 1',
Expand All @@ -2566,7 +2568,7 @@ def test_042_no_detect_types_csvt():
'field_12': 'NULL',
'#fid': 2,
'#geometry': 'None',
},
},
3: {
'id': '2',
'description': 'Test csvt 2',
Expand All @@ -2582,9 +2584,8 @@ def test_042_no_detect_types_csvt():
'field_12': '-3123724580211819352',
'#fid': 3,
'#geometry': 'None',
},
}
wanted['log']=[
]
},
}
wanted['log'] = [
]
return wanted

0 comments on commit 3be864e

Please sign in to comment.