Fix tests
This commit is contained in:
@@ -6,13 +6,13 @@ from pcbdevice.utils.FileUtils import FileUtils
|
|||||||
resources = './pcbdevice/tests/resources/'
|
resources = './pcbdevice/tests/resources/'
|
||||||
|
|
||||||
class TestFileUtils(TestCase):
|
class TestFileUtils(TestCase):
|
||||||
def test_pbmToCsv(self):
|
def test_pbmToMatrix(self):
|
||||||
actual = FileUtils.pbmToMatrix(resources + 'raw/test1.pbm')
|
actual, h, w = FileUtils.pbmToMatrix(resources + 'raw/test1.pbm')
|
||||||
expected = TestUtils.readIntFile(resources + 'formatted/test1.csv')
|
expected = TestUtils.readIntFile(resources + 'formatted/test1.csv')
|
||||||
assert actual == expected
|
assert actual == expected
|
||||||
|
|
||||||
def test_saveMatrixToFile(self):
|
def test_saveMatrixToFile(self):
|
||||||
actual = FileUtils.pbmToMatrix(resources + 'raw/test1.pbm')
|
actual, h, w = FileUtils.pbmToMatrix(resources + 'raw/test1.pbm')
|
||||||
FileUtils.saveMatrixToFile(actual, resources + 'output/test1.csv')
|
FileUtils.saveMatrixToFile(actual, resources + 'output/test1.csv')
|
||||||
expected = TestUtils.readIntFile(resources + 'output/test1.csv')
|
expected = TestUtils.readIntFile(resources + 'output/test1.csv')
|
||||||
assert actual == expected
|
assert actual == expected
|
||||||
|
|||||||
Reference in New Issue
Block a user