How to use t1 method in locust

Best Python code snippet using locust

test_query.py

Source:test_query.py Github

copy

Full Screen

...1345 )1346 self.assertRows(1347 expr, [(10, 20, 30), (11, 21, None), (12, None, None)]1348 )1349 def test_outerjoin_where_x2_t1(self):1350 """Outer joins t1->t2,t3, where on t1."""1351 for criteria in (t2.c.t2_id == t3.c.t2_id, t3.c.t2_id == t2.c.t2_id):1352 expr = select(1353 [t1.c.t1_id, t2.c.t2_id, t3.c.t3_id],1354 t1.c.name == "t1 #10",1355 from_obj=[1356 (1357 t1.outerjoin(t2, t1.c.t1_id == t2.c.t1_id).outerjoin(1358 t3, criteria1359 )1360 )1361 ],1362 )1363 self.assertRows(expr, [(10, 20, 30)])...

Full Screen

Full Screen

test_waveforms.py

Source:test_waveforms.py Github

copy

Full Screen

...142 f1 = 20.0143 t1 = 1.0144 t = np.linspace(0, t1, 10)145 assert_raises(ValueError, waveforms.chirp, t, f0, t1, f1, method)146 def test_integer_t1(self):147 f0 = 10.0148 f1 = 20.0149 t = np.linspace(-1, 1, 11)150 t1 = 3.0151 float_result = waveforms.chirp(t, f0, t1, f1)152 t1 = 3153 int_result = waveforms.chirp(t, f0, t1, f1)154 err_msg = "Integer input 't1=3' gives wrong result"155 assert_equal(int_result, float_result, err_msg=err_msg)156 def test_integer_f0(self):157 f1 = 20.0158 t1 = 3.0159 t = np.linspace(-1, 1, 11)160 f0 = 10.0...

Full Screen

Full Screen

es2015.promise.d.ts

Source:es2015.promise.d.ts Github

copy

Full Screen

1interface PromiseConstructor {2 /**3 * A reference to the prototype.4 */5 readonly prototype: Promise<any>;67 /**8 * Creates a new Promise.9 * @param executor A callback used to initialize the promise. This callback is passed two arguments:10 * a resolve callback used resolve the promise with a value or the result of another promise,11 * and a reject callback used to reject the promise with a provided reason or error.12 */13 new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;1415 /**16 * Creates a Promise that is resolved with an array of results when all of the provided Promises17 * resolve, or rejected when any Promise is rejected.18 * @param values An array of Promises.19 * @returns A new Promise.20 */21 all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;2223 /**24 * Creates a Promise that is resolved with an array of results when all of the provided Promises25 * resolve, or rejected when any Promise is rejected.26 * @param values An array of Promises.27 * @returns A new Promise.28 */29 all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;3031 /**32 * Creates a Promise that is resolved with an array of results when all of the provided Promises33 * resolve, or rejected when any Promise is rejected.34 * @param values An array of Promises.35 * @returns A new Promise.36 */37 all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;3839 /**40 * Creates a Promise that is resolved with an array of results when all of the provided Promises41 * resolve, or rejected when any Promise is rejected.42 * @param values An array of Promises.43 * @returns A new Promise.44 */45 all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;4647 /**48 * Creates a Promise that is resolved with an array of results when all of the provided Promises49 * resolve, or rejected when any Promise is rejected.50 * @param values An array of Promises.51 * @returns A new Promise.52 */53 all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;5455 /**56 * Creates a Promise that is resolved with an array of results when all of the provided Promises57 * resolve, or rejected when any Promise is rejected.58 * @param values An array of Promises.59 * @returns A new Promise.60 */61 all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;6263 /**64 * Creates a Promise that is resolved with an array of results when all of the provided Promises65 * resolve, or rejected when any Promise is rejected.66 * @param values An array of Promises.67 * @returns A new Promise.68 */69 all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;7071 /**72 * Creates a Promise that is resolved with an array of results when all of the provided Promises73 * resolve, or rejected when any Promise is rejected.74 * @param values An array of Promises.75 * @returns A new Promise.76 */77 all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;7879 /**80 * Creates a Promise that is resolved with an array of results when all of the provided Promises81 * resolve, or rejected when any Promise is rejected.82 * @param values An array of Promises.83 * @returns A new Promise.84 */85 all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;8687 /**88 * Creates a Promise that is resolved with an array of results when all of the provided Promises89 * resolve, or rejected when any Promise is rejected.90 * @param values An array of Promises.91 * @returns A new Promise.92 */93 all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;9495 /**96 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved97 * or rejected.98 * @param values An array of Promises.99 * @returns A new Promise.100 */101 race<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>;102103 /**104 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved105 * or rejected.106 * @param values An array of Promises.107 * @returns A new Promise.108 */109 race<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>;110111 /**112 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved113 * or rejected.114 * @param values An array of Promises.115 * @returns A new Promise.116 */117 race<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>;118119 /**120 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved121 * or rejected.122 * @param values An array of Promises.123 * @returns A new Promise.124 */125 race<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<T1 | T2 | T3 | T4 | T5 | T6 | T7>;126127 /**128 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved129 * or rejected.130 * @param values An array of Promises.131 * @returns A new Promise.132 */133 race<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<T1 | T2 | T3 | T4 | T5 | T6>;134135 /**136 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved137 * or rejected.138 * @param values An array of Promises.139 * @returns A new Promise.140 */141 race<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<T1 | T2 | T3 | T4 | T5>;142143 /**144 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved145 * or rejected.146 * @param values An array of Promises.147 * @returns A new Promise.148 */149 race<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<T1 | T2 | T3 | T4>;150151 /**152 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved153 * or rejected.154 * @param values An array of Promises.155 * @returns A new Promise.156 */157 race<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<T1 | T2 | T3>;158159 /**160 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved161 * or rejected.162 * @param values An array of Promises.163 * @returns A new Promise.164 */165 race<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<T1 | T2>;166167 /**168 * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved169 * or rejected.170 * @param values An array of Promises.171 * @returns A new Promise.172 */173 race<T>(values: (T | PromiseLike<T>)[]): Promise<T>;174175 /**176 * Creates a new rejected promise for the provided reason.177 * @param reason The reason the promise was rejected.178 * @returns A new rejected Promise.179 */180 reject<T = never>(reason?: any): Promise<T>;181182 /**183 * Creates a new resolved promise for the provided value.184 * @param value A promise.185 * @returns A promise whose internal state matches the provided promise.186 */187 resolve<T>(value: T | PromiseLike<T>): Promise<T>;188189 /**190 * Creates a new resolved promise .191 * @returns A resolved promise.192 */193 resolve(): Promise<void>;194}195 ...

Full Screen

Full Screen

10.1.3.js

Source:10.1.3.js Github

copy

Full Screen

...31 eval("var t; function t(){}; typeof(t)"));32// formal parameter tests33 34new TestCase(SECTION,35 "function t1(a,b) { return b; }; t1( 4 );",36 void 0,37 eval("function t1(a,b) { return b; }; t1( 4 );") );38 39new TestCase(SECTION,40 "function t1(a,b) { return a; }; t1(4);",41 4,42 eval("function t1(a,b) { return a; }; t1(4)"));43 44new TestCase(SECTION,45 "function t1(a,b) { return a; }; t1();",46 void 0,47 eval("function t1(a,b) { return a; }; t1()"));48 49new TestCase(SECTION,50 "function t1(a,b) { return a; }; t1(1,2,4);",51 1,52 eval("function t1(a,b) { return a; }; t1(1,2,4)"));53/*54 55new TestCase(SECTION, "function t1(a,a) { return a; }; t1( 4 );",56void 0,57eval("function t1(a,a) { return a; }; t1( 4 )"));58 59new TestCase(SECTION,60"function t1(a,a) { return a; }; t1( 1,2 );",612,62eval("function t1(a,a) { return a; }; t1( 1,2 )"));63*/64// variable declarations65 66new TestCase(SECTION,67 "function t1(a,b) { return a; }; t1( false, true );",68 false,69 eval("function t1(a,b) { return a; }; t1( false, true );"));70 71new TestCase(SECTION,72 "function t1(a,b) { return b; }; t1( false, true );",73 true,74 eval("function t1(a,b) { return b; }; t1( false, true );"));75 76new TestCase(SECTION,77 "function t1(a,b) { return a+b; }; t1( 4, 2 );",78 6,79 eval("function t1(a,b) { return a+b; }; t1( 4, 2 );"));80 81new TestCase(SECTION,82 "function t1(a,b) { return a+b; }; t1( 4 );",83 Number.NaN,84 eval("function t1(a,b) { return a+b; }; t1( 4 );"));85// overriding a function name with a variable should fail86 87new TestCase(SECTION,88 "function t() { return 'function' };" +89 "var t = 'variable'; typeof(t)",90 "string",91 eval("function t() { return 'function' };" +92 "var t = 'variable'; typeof(t)"));93// function as a constructor94 95new TestCase(SECTION,96 "function t1(a,b) { var a = b; return a; } t1(1,3);",97 3,98 eval("function t1(a, b){ var a = b; return a;}; t1(1,3)"));99 100new TestCase(SECTION,101 "function t2(a,b) { this.a = b; } x = new t2(1,3); x.a",102 3,103 eval("function t2(a,b) { this.a = b; };" +104 "x = new t2(1,3); x.a"));105 106new TestCase(SECTION,107 "function t2(a,b) { this.a = a; } x = new t2(1,3); x.a",108 1,109 eval("function t2(a,b) { this.a = a; };" +110 "x = new t2(1,3); x.a"));111 112new TestCase(SECTION,...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run locust automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful