File: test-run-python

package info (click to toggle)
opendht 3.0.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,284 kB
  • sloc: cpp: 23,342; python: 2,189; ansic: 2,041; makefile: 207; sh: 72
file content (14 lines) | stat: -rwxr-xr-x 283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python3
#
# Run simple Python 3 excerpt to validate the Python 3 bindings.
# Not testing networking, as it might not be available when testing.

import opendht as dht

node = dht.DhtRunner()

node.run()
assert node.isRunning()

node.join()
assert not node.isRunning()