#96: refactor skip feature:

1, with skip keyword, skip current test unconditionally;
2, with skipIf keyword, you can skip current test with condition; condition evaluation can be defined in debugtalk.py function.
This commit is contained in:
debugtalk
2018-02-08 15:59:17 +08:00
parent 177856c37c
commit c504f305f1
6 changed files with 44 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
import hashlib
import hmac
import json
import os
import random
import string
import time
@@ -40,3 +41,10 @@ def sum_status_code(status_code, expect_sum):
sum_value += int(digit)
assert sum_value == expect_sum
os.environ["TEST_ENV"] = "PRODUCTION"
def skip_test_in_production_env():
""" skip this test in production environment
"""
return os.environ["TEST_ENV"] == "PRODUCTION"