Skip to content

Commit df4988b

Browse files
author
Jeff Schroeder
committed
Add pytest-socket
This prevents SolanaClient from actually reaching out to any solana rpc nodes to keep things nice and hermetic for unit testing.
1 parent 2e2d319 commit df4988b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

pytest.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[pytest]
2+
addopts =
3+
# Prevent SolanaClient from actually reaching out to devnet
4+
--disable-socket
5+
--allow-unix-socket
6+
--cov=pythclient
7+
--no-cov-on-fail

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
author_email='[email protected]',
1111
install_requires=requirements,
1212
extras_require={
13-
'testing': requirements + ['pytest', 'pytest-cov'],
13+
'testing': requirements + ['mock', 'pytest', 'pytest-cov', 'pytest-socket'],
1414
},
1515
)

0 commit comments

Comments
 (0)