Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/+nansen/+fixture/ProjectFixture.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ function setup(fixture)
F = fixture.applyFixture( TemporaryFolderFixture );

% Create a user profile for testing. Todo: make fixture
userProfileName = sprintf('test%d', randi(999));
% The profile folder lives in prefdir, which all MATLAB processes
% on a machine share, and every fresh MATLAB process starts from
% the same default RNG seed, so a name drawn with randi can repeat
% across test processes that start together. A uuid is unique per
% process and per fixture instance. The "test" prefix keeps leftover
% profiles recognisable.
userProfileName = sprintf('test_%s', nansen.util.getuuid());
fixture.addTeardown( ...
@() fixture.deleteUserProfile(userProfileName) )

Expand Down
Loading