<s> from mrq . job import Job <EOL> import datetime <EOL> from mrq . queue import Queue <EOL> import time <EOL> import pytest <EOL> def test_sorted_graph ( worker ) : <EOL> p_queue = "<STR_LIT>" <EOL> worker . start_deps ( ) <EOL> assert Queue ( p_queue ) . size ( ) == <NUM_LIT:0> <EOL> worker . send_raw_tasks ( p_queue , { <EOL> "<STR_LIT>" : - <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT:1> , <EOL> "<STR_LIT>" : <NUM_LIT> , <EOL> "<STR_LIT>" : <NUM_LIT:2> , <EOL> "<STR_LIT>" : <NUM_LIT:4> <EOL> } , start = False , block = False ) <EOL> time . sleep ( <NUM_LIT:0.5> ) <EOL> assert Queue ( p_queue ) . size ( ) == <NUM_LIT:5> <EOL> assert Queue ( p_queue ) . get_sorted_graph ( <EOL> <NUM_LIT:1> , <NUM_LIT:4> , slices = <NUM_LIT:3> , include_inf = True ) == [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:0> , <NUM_LIT:1> ] <EOL> assert Queue ( p_queue ) . get_sorted_graph ( <EOL> <NUM_LIT:1> , <NUM_LIT:4> , slices = <NUM_LIT:3> , include_inf = False ) == [ <NUM_LIT:2> , <NUM_LIT:1> , <NUM_LIT:0> ] <EOL> worker . stop_deps ( ) </s>
