forked from espressif/esp-idf
example_test: using try block to pass the python style check
This commit is contained in:
@@ -1,14 +1,17 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
test_fw_path = os.getenv("TEST_FW_PATH")
|
|
||||||
if test_fw_path and test_fw_path not in sys.path:
|
|
||||||
sys.path.insert(0, test_fw_path)
|
|
||||||
import TinyFW
|
|
||||||
import IDF
|
|
||||||
|
|
||||||
EXPECT_TIMEOUT = 20
|
EXPECT_TIMEOUT = 20
|
||||||
|
|
||||||
|
try:
|
||||||
|
import IDF
|
||||||
|
except ImportError:
|
||||||
|
test_fw_path = os.getenv("TEST_FW_PATH")
|
||||||
|
if test_fw_path and test_fw_path not in sys.path:
|
||||||
|
sys.path.insert(0, test_fw_path)
|
||||||
|
import IDF
|
||||||
|
|
||||||
|
|
||||||
@IDF.idf_example_test(env_tag='Example_I2C_CCS811_SENSOR')
|
@IDF.idf_example_test(env_tag='Example_I2C_CCS811_SENSOR')
|
||||||
def test_i2ctools_example(env, extra_data):
|
def test_i2ctools_example(env, extra_data):
|
||||||
|
Reference in New Issue
Block a user