| @@ -16,3 +16,11 @@ class TestFileUtils(TestCase): | |||||||
| 		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 | ||||||
|  | 		 | ||||||
|  | 	def test_getPixelSize(self): | ||||||
|  | 		assert 10, 10 == FileUtils.getPixelSize(10, 10, 100, 100) | ||||||
|  | 		assert 1, 1 == FileUtils.getPixelSize(100, 100, 100, 100) | ||||||
|  | 		assert 10, 10 == FileUtils.getPixelSize(10, 10, 10, 10, unit = 'cm') | ||||||
|  | 		assert 10, 10 == FileUtils.getPixelSize(10, 10, 1, 1, unit = 'm') | ||||||
|  | 		assert 254, 254 == FileUtils.getPixelSize(10, 10, 10, 10, unit = 'in') | ||||||
|  | 		assert 10, 5 == FileUtils.getPixelSize(10, 10, 10, 20) | ||||||
		Reference in New Issue
	
	Block a user
	 Marc-Antoine Lafreniere
					Marc-Antoine Lafreniere