File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -561,6 +561,9 @@ def test_modelpipeline_classmethod_constructor(mock_future,
561
561
562
562
@pytest .mark .skipif (not HAS_NUMPY , reason = "numpy not installed" )
563
563
def test_modelpipeline_classmethod_constructor_nonint_id ():
564
+ # Verify that we can still JSON-serialize job and run IDs even
565
+ # if they're entered in a non-JSON-able format.
566
+ # We need to turn them into JSON to set them as script arguments.
564
567
mock_client = setup_client_mock (1 , 2 )
565
568
mock_client .scripts .get_containers .return_value = container_response_stub ()
566
569
@@ -569,7 +572,7 @@ def test_modelpipeline_classmethod_constructor_nonint_id():
569
572
570
573
out = json .dumps ({'job' : mp .train_result_ .job_id ,
571
574
'run' : mp .train_result_ .run_id })
572
- assert out == '{"job": 1, "run": 2}'
575
+ assert out == '{"job": 1, "run": 2}' or out == '{"run": 2, "job": 1}'
573
576
574
577
575
578
@mock .patch .object (_model , 'ModelFuture' , autospec = True )
You can’t perform that action at this time.
0 commit comments