OSSubprocess icon indicating copy to clipboard operation
OSSubprocess copied to clipboard

Do not use FileSystem workingDirectory in tests

Open dionisiydk opened this issue 7 years ago • 0 comments

Now if you will run pharo on MacOS using Finder (by drag and drop image for example) tests which generate temp files will fail. The problem is that working directory is resolved by OS as the root in that case. In Pharo 6 workingDirectory was equal to imageDirectory and tests were always green. But in Pharo 7 it is the true OS based working directory

I suggest to use in tests FileLocator temp instead of workingDirectory. Or even better, use existing method to get temp files. For example replace following code:

FileSystem workingDirectory / 'zombiesByPharoVM-' , UUID new printString

with:

FileReference newTempFilePrefix: 'zombiesByPharoVM-' suffix: ''

dionisiydk avatar Jan 25 '18 15:01 dionisiydk