mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
add mock for tests
This commit is contained in:
parent
978873d606
commit
30fcc527a5
1 changed files with 6 additions and 0 deletions
|
@ -163,6 +163,12 @@ virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/patrick/Library/Caches/py
|
||||||
fileHash,
|
fileHash,
|
||||||
cachePaths
|
cachePaths
|
||||||
) => {
|
) => {
|
||||||
|
restoreCacheSpy.mockImplementation(
|
||||||
|
(cachePaths: string[], primaryKey: string, restoreKey?: string) => {
|
||||||
|
return primaryKey.includes(fileHash) ? primaryKey : '';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const cacheDistributor = getCacheDistributor(
|
const cacheDistributor = getCacheDistributor(
|
||||||
packageManager,
|
packageManager,
|
||||||
pythonVersion,
|
pythonVersion,
|
||||||
|
|
Loading…
Add table
Reference in a new issue