Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
fix(reg): Remove useless error return and logging
Browse files Browse the repository at this point in the history
Use list pass_case to recode which cases are passing cases.
  • Loading branch information
howjmay committed May 23, 2019
1 parent b65e818 commit af7d054
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions tests/regression/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ def test_mam_send_msg(self):
response[i][0] + ", status code = " + response[i][1])

for i in range(len(response)):
logging.debug("send msg i = " + str(i) + ", res = " +
response[i][0] + ", status code = " + response[i][1])
if i in pass_case:
res_json = json.loads(response[i][0])
self.assertTrue(valid_trytes(res_json["channel"], LEN_ADDR))
Expand Down Expand Up @@ -188,8 +186,6 @@ def test_mam_recv_msg(self):

pass_case = [0]
for i in range(len(test_cases)):
logging.debug("recv msg i = " + str(i) + ", res = " +
response[i][0] + ", status code = " + response[i][1])
if i in pass_case:
self.assertTrue(expect_cases[i] in response[i][0])
else:
Expand Down Expand Up @@ -263,8 +259,6 @@ def test_send_transfer(self):

pass_case = [0, 1, 2, 3]
for i in range(len(response)):
logging.debug("send transfer i = " + str(i) + ", res = " +
response[i][0] + ", status code = " + response[i][1])
if i in pass_case:
res_json = json.loads(response[i][0])

Expand Down Expand Up @@ -353,11 +347,9 @@ def test_find_transactions_by_tag(self):
logging.debug("find transactions by tag i = " + str(i) +
", res = " + response[i][0] + ", status code = " +
response[i][1])
pass_case = [0, 1]
for i in range(len(response)):
logging.debug("find transactions by tag i = " + str(i) +
", res = " + response[i][0] + ", status code = " +
response[i][1])
if i == 0 or i == 1:
if i in pass_case:
tx_res_json = json.loads(transaction_response[i][0])
res_json = json.loads(response[i][0])

Expand Down Expand Up @@ -417,11 +409,9 @@ def test_get_transactions_object(self):
", res = " + repr(response[i][0]) +
", status code = " + repr(response[i][1]))

pass_case = [0]
for i in range(len(response)):
logging.debug("get transactions object i = " + str(i) +
", res = " + repr(response[i][0]) +
", status code = " + repr(response[i][1]))
if i == 0:
if i in pass_case:
res_json = json.loads(response[i][0])
self.assertEqual(sent_transaction_hash, res_json["hash"])
else:
Expand Down Expand Up @@ -461,6 +451,3 @@ def test_get_transactions_object(self):
else:
logging.basicConfig(level=logging.INFO)
unittest.main(argv=['first-arg-is-ignored'], exit=True)

if len(unittest.TestResult().errors) != 0:
exit(1)

0 comments on commit af7d054

Please sign in to comment.