File tree Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,16 @@ TEST_ARGS=
3737CLOUD_FILTERS = -m "not run_only_for_edge_endpoint"
3838EDGE_FILTERS = -m "not skip_for_edge_endpoint"
3939
40+ # Record information about the slowest 25 tests (but don't show anything slower than 0.1 seconds)
41+ PROFILING_ARGS = \
42+ --durations 25 \
43+ --durations-min 0.1
44+
4045test : install # # Run tests against the prod API (needs GROUNDLIGHT_API_TOKEN)
41- ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
46+ ${PYTEST} ${PROFILING_ARGS} ${ TEST_ARGS} ${CLOUD_FILTERS} test
4247
4348test-4edge : install # # Run tests against the prod API via the edge-endpoint (needs GROUNDLIGHT_API_TOKEN)
44- ${PYTEST} ${TEST_ARGS} ${EDGE_FILTERS} test
49+ ${PYTEST} ${PROFILING_ARGS} ${ TEST_ARGS} ${EDGE_FILTERS} test
4550
4651test-local : install # # Run tests against a localhost API (needs GROUNDLIGHT_API_TOKEN and a local API server)
4752 GROUNDLIGHT_ENDPOINT=" http://localhost:8000/" ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ def test_create_action(gl_experimental: ExperimentalApi):
1313 rule = gl_experimental .
create_rule (
det ,
f"test_rule_{ name } " ,
"EMAIL" ,
"[email protected] " )
1414 rule2 = gl_experimental .get_rule (rule .id )
1515 assert rule == rule2
16- gl_experimental .delete_rule (rule .id )
17- with pytest .raises (NotFoundException ) as _ :
18- gl_experimental .get_rule (rule .id )
1916
2017
2118@pytest .mark .skip (reason = "actions are global on account, the test matrix collides with itself" ) # type: ignore
@@ -45,6 +42,13 @@ def test_create_action_with_human_review(gl_experimental: ExperimentalApi):
4542 )
4643 rule2 = gl_experimental .get_rule (rule .id )
4744 assert rule == rule2
45+
46+
47+ @pytest .mark .skip (reason = "actions are global on account, the test matrix collides with itself" ) # type: ignore
48+ def test_delete_action (gl_experimental : ExperimentalApi ):
49+ name = f"Test { datetime .utcnow ()} "
50+ det = gl_experimental .get_or_create_detector (name , "test_query" )
51+ rule = gl_experimental .
create_rule (
det ,
f"test_rule_{ name } " ,
"EMAIL" ,
"[email protected] " )
4852 gl_experimental .delete_rule (rule .id )
4953 with pytest .raises (NotFoundException ) as _ :
5054 gl_experimental .get_rule (rule .id )
Original file line number Diff line number Diff line change 66from groundlight_openapi_client .exceptions import NotFoundException
77
88
9+ @pytest .mark .skip (reason = "This is an expensive test, reset may take some time" )
910def test_reset_retry (gl_experimental : ExperimentalApi ):
1011 # Reset the detector, retrying in case the reset is still ongoing
1112 det = gl_experimental .create_detector (f"Test { datetime .utcnow ()} " , "test_query" )
@@ -25,6 +26,7 @@ def test_reset_retry(gl_experimental: ExperimentalApi):
2526 raise Exception ("Failed to reset detector" )
2627
2728
29+ @pytest .mark .skip (reason = "This test does not work with strong 0 shot models, enabled by default based on your account" )
2830def test_reset_training (gl_experimental : ExperimentalApi ):
2931 # If we reset a detector, we should have low confidence after the reset
3032 low_confidence_threshold = 0.6
Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ def test_counting_detector(gl_experimental: ExperimentalApi):
5656 assert count_iq .result .count is not None
5757
5858
59+ @pytest .mark .skip (
60+ reason = (
61+ "General users currently currently can't use multiclass detectors. If you have questions, reach out"
62+ " to Groundlight support, or upgrade your plan."
63+ )
64+ )
5965def test_multiclass_detector (gl_experimental : ExperimentalApi ):
6066 """
6167 verify that we can create and submit to a multi-class detector
You can’t perform that action at this time.
0 commit comments