Skip to content

Commit

Permalink
Update black formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy authored and antoninbas committed Apr 10, 2024
1 parent a17e6d9 commit 23ebe72
Show file tree
Hide file tree
Showing 19 changed files with 463 additions and 254 deletions.
10 changes: 5 additions & 5 deletions CI/check-nnpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import sys

pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
pub.bind('inproc://foo')
pub.bind("inproc://foo")

sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
sub.connect('inproc://foo')
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '')
sub.connect("inproc://foo")
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, "")

pub.send('hello, world')
pub.send("hello, world")
recv = sub.recv()

if recv != b'hello, world':
if recv != b"hello, world":
sys.exit(1)
12 changes: 7 additions & 5 deletions example/mytests/sai_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol


class SAIThriftTest(BaseTest):

def setUp(self):
BaseTest.setUp(self)

test_params = testutils.test_params_get()
print
print "You specified the following test-params when invoking ptf:"
for k, v in test_params.items():
print k, ":\t\t\t", v
print()
print("You specified the following test-params when invoking ptf:")
for k, v in list(test_params.items()):
print(k, ":\t\t\t", v)

# Set up thrift client and contact server
self.transport = TSocket.TSocket('localhost', 9092)
self.transport = TSocket.TSocket("localhost", 9092)
self.transport = TTransport.TBufferedTransport(self.transport)
self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport)

Expand All @@ -46,6 +47,7 @@ def tearDown(self):
BaseTest.tearDown(self)
self.transport.close()


class SAIThriftDataplaneTest(SAIThriftTest):

def setUp(self):
Expand Down
Loading

0 comments on commit 23ebe72

Please sign in to comment.