File utils refactor and unittests
Create unit test for file utils closes #25 closes #26
This commit is contained in:
14
pcbdevice/utils/TestUtils.py
Normal file
14
pcbdevice/utils/TestUtils.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def readIntFile(filePath):
|
||||
completeFile = []
|
||||
file = open(filePath, 'r')
|
||||
lines = file.readlines()
|
||||
file.close()
|
||||
|
||||
for line in lines:
|
||||
tempArray = []
|
||||
for val in line.split():
|
||||
tempArray.append(int(val))
|
||||
|
||||
completeFile.append(tempArray)
|
||||
|
||||
return completeFile
|
||||
Reference in New Issue
Block a user