mirror of
https://github.com/logos-storage/logos-storage-network-crawler.git
synced 2026-01-04 06:23:08 +00:00
tests are building
This commit is contained in:
parent
c374dfc844
commit
6514e32919
25
Makefile
25
Makefile
@ -130,31 +130,6 @@ test: | build deps
|
|||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
echo -e $(BUILD_MSG) "build/$@" && \
|
||||||
$(ENV_SCRIPT) nim test $(NIM_PARAMS) build.nims
|
$(ENV_SCRIPT) nim test $(NIM_PARAMS) build.nims
|
||||||
|
|
||||||
# Builds and runs the smart contract tests
|
|
||||||
testContracts: | build deps
|
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
|
||||||
$(ENV_SCRIPT) nim testContracts $(NIM_PARAMS) --define:ws_resubscribe=240 build.nims
|
|
||||||
|
|
||||||
# Builds and runs the integration tests
|
|
||||||
testIntegration: | build deps
|
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
|
||||||
$(ENV_SCRIPT) nim testIntegration $(NIM_PARAMS) --define:ws_resubscribe=240 build.nims
|
|
||||||
|
|
||||||
# Builds and runs all tests (except for Taiko L2 tests)
|
|
||||||
testAll: | build deps
|
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
|
||||||
$(ENV_SCRIPT) nim testAll $(NIM_PARAMS) build.nims
|
|
||||||
|
|
||||||
# Builds and runs Taiko L2 tests
|
|
||||||
testTaiko: | build deps
|
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
|
||||||
$(ENV_SCRIPT) nim testTaiko $(NIM_PARAMS) build.nims
|
|
||||||
|
|
||||||
# Builds and runs tool tests
|
|
||||||
testTools: | cirdl
|
|
||||||
echo -e $(BUILD_MSG) "build/$@" && \
|
|
||||||
$(ENV_SCRIPT) nim testTools $(NIM_PARAMS) build.nims
|
|
||||||
|
|
||||||
# nim-libbacktrace
|
# nim-libbacktrace
|
||||||
LIBBACKTRACE_MAKE_FLAGS := -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
LIBBACKTRACE_MAKE_FLAGS := -C vendor/nim-libbacktrace --no-print-directory BUILD_CXX_LIB=0
|
||||||
libbacktrace:
|
libbacktrace:
|
||||||
|
|||||||
@ -34,9 +34,9 @@ task codexcrawler, "build codexcrawler binary":
|
|||||||
params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE"
|
params = "-d:chronicles_runtime_filtering -d:chronicles_log_level=TRACE"
|
||||||
|
|
||||||
task testCodexcrawler, "Build & run Codex Crawler tests":
|
task testCodexcrawler, "Build & run Codex Crawler tests":
|
||||||
test "testCodexCrawler", params = "-d:codex_enable_proof_failures=true"
|
test "testCodexCrawler"
|
||||||
|
|
||||||
task build, "build codex binary":
|
task build, "build codex crawler binary":
|
||||||
codexCrawlerTask()
|
codexCrawlerTask()
|
||||||
|
|
||||||
task test, "Run tests":
|
task test, "Run tests":
|
||||||
|
|||||||
@ -34,9 +34,12 @@ suite "ChainMetrics":
|
|||||||
teardown:
|
teardown:
|
||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
|
|
||||||
proc onStep() {.async.} =
|
proc onStep() {.async: (raises: []).} =
|
||||||
(await state.steppers[0]()).tryGet()
|
try:
|
||||||
|
(await state.steppers[0]()).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in onStep")
|
||||||
|
|
||||||
test "start should start stepper for config.requestCheckDelay minutes":
|
test "start should start stepper for config.requestCheckDelay minutes":
|
||||||
check:
|
check:
|
||||||
state.delays.len == 1
|
state.delays.len == 1
|
||||||
|
|||||||
@ -35,9 +35,12 @@ suite "DhtCrawler":
|
|||||||
teardown:
|
teardown:
|
||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
|
|
||||||
proc onStep() {.async.} =
|
proc onStep() {.async: (raises: []).} =
|
||||||
(await state.steppers[0]()).tryGet()
|
try:
|
||||||
|
(await state.steppers[0]()).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in onStep")
|
||||||
|
|
||||||
proc responsive(nid: Nid): GetNeighborsResponse =
|
proc responsive(nid: Nid): GetNeighborsResponse =
|
||||||
GetNeighborsResponse(isResponsive: true, nodeIds: @[nid])
|
GetNeighborsResponse(isResponsive: true, nodeIds: @[nid])
|
||||||
|
|
||||||
@ -68,7 +71,7 @@ suite "DhtCrawler":
|
|||||||
|
|
||||||
test "nodes returned by getNeighbors are raised as nodesFound":
|
test "nodes returned by getNeighbors are raised as nodesFound":
|
||||||
var nodesFound = newSeq[Nid]()
|
var nodesFound = newSeq[Nid]()
|
||||||
proc onNodesFound(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onNodesFound(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
nodesFound = nids
|
nodesFound = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
@ -86,7 +89,7 @@ suite "DhtCrawler":
|
|||||||
|
|
||||||
test "responsive result from getNeighbors raises the node as successful dhtNodeCheck":
|
test "responsive result from getNeighbors raises the node as successful dhtNodeCheck":
|
||||||
var checkEvent = DhtNodeCheckEventData()
|
var checkEvent = DhtNodeCheckEventData()
|
||||||
proc onCheck(event: DhtNodeCheckEventData): Future[?!void] {.async.} =
|
proc onCheck(event: DhtNodeCheckEventData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
checkEvent = event
|
checkEvent = event
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
@ -105,7 +108,7 @@ suite "DhtCrawler":
|
|||||||
|
|
||||||
test "unresponsive result from getNeighbors raises the node as unsuccessful dhtNodeCheck":
|
test "unresponsive result from getNeighbors raises the node as unsuccessful dhtNodeCheck":
|
||||||
var checkEvent = DhtNodeCheckEventData()
|
var checkEvent = DhtNodeCheckEventData()
|
||||||
proc onCheck(event: DhtNodeCheckEventData): Future[?!void] {.async.} =
|
proc onCheck(event: DhtNodeCheckEventData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
checkEvent = event
|
checkEvent = event
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
|
|||||||
@ -35,13 +35,18 @@ suite "DhtMetrics":
|
|||||||
(await dhtmetrics.stop()).tryGet()
|
(await dhtmetrics.stop()).tryGet()
|
||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
|
|
||||||
proc fireDhtNodeCheckEvent(isOk: bool) {.async.} =
|
proc fireDhtNodeCheckEvent(isOk: bool) {.async: (raises: []).} =
|
||||||
let event = DhtNodeCheckEventData(id: nid, isOk: isOk)
|
let event = DhtNodeCheckEventData(id: nid, isOk: isOk)
|
||||||
|
try:
|
||||||
|
(await state.events.dhtNodeCheck.fire(event)).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireDhtNodeCheckEvent")
|
||||||
|
|
||||||
(await state.events.dhtNodeCheck.fire(event)).tryGet()
|
proc fireNodesDeletedEvent(nids: seq[Nid]) {.async: (raises: []).} =
|
||||||
|
try:
|
||||||
proc fireNodesDeletedEvent(nids: seq[Nid]) {.async.} =
|
(await state.events.nodesDeleted.fire(nids)).tryGet()
|
||||||
(await state.events.nodesDeleted.fire(nids)).tryGet()
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireNodesDeletedEvent")
|
||||||
|
|
||||||
test "dhtmetrics start should load both lists":
|
test "dhtmetrics start should load both lists":
|
||||||
check:
|
check:
|
||||||
|
|||||||
@ -38,11 +38,17 @@ suite "Nodestore":
|
|||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
removeDir(dsPath)
|
removeDir(dsPath)
|
||||||
|
|
||||||
proc fireNodeFoundEvent(nids: seq[Nid]) {.async.} =
|
proc fireNodeFoundEvent(nids: seq[Nid]) {.async: (raises: []).} =
|
||||||
(await state.events.nodesFound.fire(nids)).tryGet()
|
try:
|
||||||
|
(await state.events.nodesFound.fire(nids)).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireNodeFoundEvent")
|
||||||
|
|
||||||
proc fireCheckEvent(nid: Nid, isOk: bool) {.async.} =
|
proc fireCheckEvent(nid: Nid, isOk: bool) {.async: (raises: []).} =
|
||||||
(await state.events.dhtNodeCheck.fire(DhtNodeCheckEventData(id: nid, isOk: isOk))).tryGet()
|
try:
|
||||||
|
(await state.events.dhtNodeCheck.fire(DhtNodeCheckEventData(id: nid, isOk: isOk))).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireCheckEvent")
|
||||||
|
|
||||||
test "nodeEntry encoding":
|
test "nodeEntry encoding":
|
||||||
let entry =
|
let entry =
|
||||||
@ -73,7 +79,7 @@ suite "Nodestore":
|
|||||||
|
|
||||||
test "nodesFound event should fire newNodesDiscovered":
|
test "nodesFound event should fire newNodesDiscovered":
|
||||||
var newNodes = newSeq[Nid]()
|
var newNodes = newSeq[Nid]()
|
||||||
proc onNewNodes(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onNewNodes(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
newNodes = nids
|
newNodes = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
@ -97,7 +103,7 @@ suite "Nodestore":
|
|||||||
var
|
var
|
||||||
newNodes = newSeq[Nid]()
|
newNodes = newSeq[Nid]()
|
||||||
count = 0
|
count = 0
|
||||||
proc onNewNodes(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onNewNodes(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
newNodes = nids
|
newNodes = nids
|
||||||
inc count
|
inc count
|
||||||
return success()
|
return success()
|
||||||
@ -175,7 +181,7 @@ suite "Nodestore":
|
|||||||
|
|
||||||
test "deleteEntries fires nodesDeleted event":
|
test "deleteEntries fires nodesDeleted event":
|
||||||
var deletedNodes = newSeq[Nid]()
|
var deletedNodes = newSeq[Nid]()
|
||||||
proc onDeleted(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onDeleted(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
deletedNodes = nids
|
deletedNodes = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
@ -245,7 +251,7 @@ suite "Nodestore":
|
|||||||
|
|
||||||
test "dhtNodeCheck event for non-existing node should fire nodesDeleted":
|
test "dhtNodeCheck event for non-existing node should fire nodesDeleted":
|
||||||
var deletedNodes = newSeq[Nid]()
|
var deletedNodes = newSeq[Nid]()
|
||||||
proc onDeleted(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onDeleted(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
deletedNodes = nids
|
deletedNodes = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ suite "TimeTracker":
|
|||||||
|
|
||||||
# Subscribe to nodesToRevisit event
|
# Subscribe to nodesToRevisit event
|
||||||
nodesToRevisitReceived = newSeq[Nid]()
|
nodesToRevisitReceived = newSeq[Nid]()
|
||||||
proc onToRevisit(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onToRevisit(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
nodesToRevisitReceived = nids
|
nodesToRevisitReceived = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
@ -53,11 +53,17 @@ suite "TimeTracker":
|
|||||||
await state.events.nodesToRevisit.unsubscribe(sub)
|
await state.events.nodesToRevisit.unsubscribe(sub)
|
||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
|
|
||||||
proc onStepCheck() {.async.} =
|
proc onStepCheck() {.async: (raises: []).} =
|
||||||
(await state.steppers[0]()).tryGet()
|
try:
|
||||||
|
(await state.steppers[0]()).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in onStepCheck")
|
||||||
|
|
||||||
proc onStepRt() {.async.} =
|
proc onStepRt() {.async: (raises: []).} =
|
||||||
(await state.steppers[1]()).tryGet()
|
try:
|
||||||
|
(await state.steppers[1]()).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in onStepRt")
|
||||||
|
|
||||||
proc createNodeInStore(lastVisit: uint64, firstInactive = 0.uint64): Nid =
|
proc createNodeInStore(lastVisit: uint64, firstInactive = 0.uint64): Nid =
|
||||||
let entry =
|
let entry =
|
||||||
@ -120,7 +126,7 @@ suite "TimeTracker":
|
|||||||
|
|
||||||
test "onStep raises routingTable nodes as nodesFound":
|
test "onStep raises routingTable nodes as nodesFound":
|
||||||
var nodesFound = newSeq[Nid]()
|
var nodesFound = newSeq[Nid]()
|
||||||
proc onNodesFound(nids: seq[Nid]): Future[?!void] {.async.} =
|
proc onNodesFound(nids: seq[Nid]): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
nodesFound = nids
|
nodesFound = nids
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
|
|||||||
@ -29,11 +29,17 @@ suite "TodoList":
|
|||||||
(await todo.stop()).tryGet()
|
(await todo.stop()).tryGet()
|
||||||
state.checkAllUnsubscribed()
|
state.checkAllUnsubscribed()
|
||||||
|
|
||||||
proc fireNewNodesDiscoveredEvent(nids: seq[Nid]) {.async.} =
|
proc fireNewNodesDiscoveredEvent(nids: seq[Nid]) {.async: (raises: []).} =
|
||||||
(await state.events.newNodesDiscovered.fire(nids)).tryGet()
|
try:
|
||||||
|
(await state.events.newNodesDiscovered.fire(nids)).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireNewNodesDiscoveredEvent")
|
||||||
|
|
||||||
proc fireNodesToRevisitEvent(nids: seq[Nid]) {.async.} =
|
proc fireNodesToRevisitEvent(nids: seq[Nid]) {.async: (raises: []).} =
|
||||||
(await state.events.nodesToRevisit.fire(nids)).tryGet()
|
try:
|
||||||
|
(await state.events.nodesToRevisit.fire(nids)).tryGet()
|
||||||
|
except CatchableError:
|
||||||
|
raiseAssert("CatchableError in fireNodesToRevisitEvent")
|
||||||
|
|
||||||
test "discovered nodes are added to todo list":
|
test "discovered nodes are added to todo list":
|
||||||
await fireNewNodesDiscoveredEvent(@[nid])
|
await fireNewNodesDiscoveredEvent(@[nid])
|
||||||
|
|||||||
@ -12,17 +12,17 @@ type MockList* = ref object of List
|
|||||||
removeSuccess*: bool
|
removeSuccess*: bool
|
||||||
length*: int
|
length*: int
|
||||||
|
|
||||||
method load*(this: MockList): Future[?!void] {.async.} =
|
method load*(this: MockList): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
this.loadCalled = true
|
this.loadCalled = true
|
||||||
return success()
|
return success()
|
||||||
|
|
||||||
method add*(this: MockList, nid: Nid): Future[?!void] {.async.} =
|
method add*(this: MockList, nid: Nid): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
this.added.add(nid)
|
this.added.add(nid)
|
||||||
if this.addSuccess:
|
if this.addSuccess:
|
||||||
return success()
|
return success()
|
||||||
return failure("test failure")
|
return failure("test failure")
|
||||||
|
|
||||||
method remove*(this: MockList, nid: Nid): Future[?!void] {.async.} =
|
method remove*(this: MockList, nid: Nid): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
this.removed.add(nid)
|
this.removed.add(nid)
|
||||||
if this.removeSuccess:
|
if this.removeSuccess:
|
||||||
return success()
|
return success()
|
||||||
|
|||||||
@ -15,7 +15,7 @@ proc checkAllUnsubscribed*(s: MockState) =
|
|||||||
s.events.dhtNodeCheck.listeners == 0
|
s.events.dhtNodeCheck.listeners == 0
|
||||||
s.events.nodesToRevisit.listeners == 0
|
s.events.nodesToRevisit.listeners == 0
|
||||||
|
|
||||||
method whileRunning*(s: MockState, step: OnStep, delay: Duration) {.async.} =
|
method whileRunning*(s: MockState, step: OnStep, delay: Duration) {.async: (raises: [CancelledError]).} =
|
||||||
s.steppers.add(step)
|
s.steppers.add(step)
|
||||||
s.delays.add(delay)
|
s.delays.add(delay)
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ suite "AsyncDataEvent":
|
|||||||
|
|
||||||
test "Successful event":
|
test "Successful event":
|
||||||
var data = ""
|
var data = ""
|
||||||
proc eventHandler(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data = e.s
|
data = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ suite "AsyncDataEvent":
|
|||||||
|
|
||||||
test "Multiple events":
|
test "Multiple events":
|
||||||
var counter = 0
|
var counter = 0
|
||||||
proc eventHandler(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
inc counter
|
inc counter
|
||||||
success()
|
success()
|
||||||
|
|
||||||
@ -54,15 +54,15 @@ suite "AsyncDataEvent":
|
|||||||
data1 = ""
|
data1 = ""
|
||||||
data2 = ""
|
data2 = ""
|
||||||
data3 = ""
|
data3 = ""
|
||||||
proc eventHandler1(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler1(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data1 = e.s
|
data1 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
proc eventHandler2(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler2(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data2 = e.s
|
data2 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
proc eventHandler3(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler3(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data3 = e.s
|
data3 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ suite "AsyncDataEvent":
|
|||||||
await event.unsubscribe(sub3)
|
await event.unsubscribe(sub3)
|
||||||
|
|
||||||
test "Failed event preserves error message":
|
test "Failed event preserves error message":
|
||||||
proc eventHandler(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
failure(msg)
|
failure(msg)
|
||||||
|
|
||||||
let s = event.subscribe(eventHandler)
|
let s = event.subscribe(eventHandler)
|
||||||
@ -100,15 +100,15 @@ suite "AsyncDataEvent":
|
|||||||
data2 = ""
|
data2 = ""
|
||||||
data3 = ""
|
data3 = ""
|
||||||
|
|
||||||
proc handler1(e: ExampleData): Future[?!void] {.async.} =
|
proc handler1(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data1 = e.s
|
data1 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
proc handler2(e: ExampleData): Future[?!void] {.async.} =
|
proc handler2(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data2 = e.s
|
data2 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
proc handler3(e: ExampleData): Future[?!void] {.async.} =
|
proc handler3(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
data3 = e.s
|
data3 = e.s
|
||||||
success()
|
success()
|
||||||
|
|
||||||
@ -134,18 +134,18 @@ suite "AsyncDataEvent":
|
|||||||
isOK(await event.fire(ExampleData(s: msg)))
|
isOK(await event.fire(ExampleData(s: msg)))
|
||||||
|
|
||||||
test "Can unsubscribe in handler":
|
test "Can unsubscribe in handler":
|
||||||
proc doNothing() {.async, closure.} =
|
proc doNothing() {.async: (raises: [CancelledError]), closure.} =
|
||||||
await sleepAsync(1.millis)
|
await sleepAsync(1.millis)
|
||||||
|
|
||||||
var callback = doNothing
|
var callback = doNothing
|
||||||
|
|
||||||
proc eventHandler(e: ExampleData): Future[?!void] {.async.} =
|
proc eventHandler(e: ExampleData): Future[?!void] {.async: (raises: [CancelledError]).} =
|
||||||
await callback()
|
await callback()
|
||||||
success()
|
success()
|
||||||
|
|
||||||
let s = event.subscribe(eventHandler)
|
let s = event.subscribe(eventHandler)
|
||||||
|
|
||||||
proc doUnsubscribe() {.async.} =
|
proc doUnsubscribe() {.async: (raises: [CancelledError]).} =
|
||||||
await event.unsubscribe(s)
|
await event.unsubscribe(s)
|
||||||
|
|
||||||
callback = doUnsubscribe
|
callback = doUnsubscribe
|
||||||
|
|||||||
@ -11,4 +11,4 @@ requires "asynctest >= 0.5.2 & < 0.6.0"
|
|||||||
requires "unittest2 <= 0.3.0"
|
requires "unittest2 <= 0.3.0"
|
||||||
|
|
||||||
task test, "Run tests":
|
task test, "Run tests":
|
||||||
exec "nim c -r test.nim"
|
exec "nim c -r testCodexCrawler.nim"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user