Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.PHONY: format-check
format-check:
@echo "Checking format..."
python -m black --check src/ ptf
python -m black --check src/ ptf_nn/ example/ utests/ ptf --exclude [a-z]-nnpy.py

.PHONY: format
format:
@echo "Formatting..."
python -m black src/ ptf
python -m black --check src/ ptf_nn/ example/ utests/ ptf --exclude [a-z]-nnpy.py

.PHONY: set-dev
set-dev:
Expand Down
14 changes: 7 additions & 7 deletions example/mytests/sai_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol

class SAIThriftTest(BaseTest):

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,8 +46,8 @@ def tearDown(self):
BaseTest.tearDown(self)
self.transport.close()

class SAIThriftDataplaneTest(SAIThriftTest):

class SAIThriftDataplaneTest(SAIThriftTest):
def setUp(self):
SAIThriftTest.setUp(self)

Expand Down
Loading