Skip to content

Commit a6cd8c4

Browse files
committed
tests: updated tests to the new version of utils module
FossilOrigin-Name: 4e8f4a4d6f5b51ccbfc521cca63ad7adfb5f54078e33e33480d1762e8ac621e4
1 parent 56c1f86 commit a6cd8c4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

tests/options.nim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
## Provides unit tests for options module
2727

28-
import std/paths
2928
import utils/utils
3029
import ../src/history
3130
import unittest2
@@ -34,8 +33,7 @@ include ../src/options
3433
suite "Unit tests for options module":
3534

3635
checkpoint "Initializing the tests"
37-
const dbName: Path = "test11.db".Path
38-
let db: DbConn = initDb(dbName = dbName)
36+
let db: DbConn = initDb()
3937
var commands: ref Table[string, CommandData] = newTable[string, CommandData]()
4038
discard initHistory(db = db, commands = commands)
4139

@@ -98,4 +96,4 @@ suite "Unit tests for options module":
9896
to(dbVal = text.dbValue, T = OptionValType) == text
9997

10098
suiteTeardown:
101-
removeDb(dbName = dbName, db = db)
99+
removeDb(db = db)

tests/output.nim

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
## Provides unit tests for output module
2727

28-
import std/paths
2928
when defined(testInput):
3029
import std/tables
3130
import utils/utils
@@ -35,8 +34,7 @@ include ../src/output
3534
suite "Unit tests for output module":
3635

3736
checkpoint "Initializing the tests"
38-
const dbName: Path = "test12.db".Path
39-
let db: DbConn = initDb(dbName = dbName)
37+
let db: DbConn = initDb()
4038

4139
test "Showing an error message":
4240
check:
@@ -67,4 +65,4 @@ suite "Unit tests for output module":
6765
showFormPrompt(prompt = "Form prompt", db = db)
6866

6967
suiteTeardown:
70-
removeDb(dbName = dbName, db = db)
68+
removeDb(db = db)

0 commit comments

Comments
 (0)