atlas tool: testing via mocking (#18588)
* atlas: refactoring * Atlas: do some basic testing via mocking
This commit is contained in:
parent
d4c3a09286
commit
664dbb6bfb
13 changed files with 387 additions and 58 deletions
|
|
@ -3,14 +3,6 @@
|
|||
|
||||
import os, strutils, osproc
|
||||
|
||||
template withDir*(dir, body) =
|
||||
let oldDir = getCurrentDir()
|
||||
try:
|
||||
setCurrentDir(dir)
|
||||
body
|
||||
finally:
|
||||
setCurrentDir(oldDir)
|
||||
|
||||
proc isUrl*(x: string): bool =
|
||||
x.startsWith("git://") or x.startsWith("https://") or x.startsWith("http://")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue