How to use test_multi_graphs method in yandex-tank

Best Python code snippet using yandex-tank

test_weaire_thorpe.py

Source:test_weaire_thorpe.py Github

copy

Full Screen

...22 #ax.scatter(*WT_g.vertices.positions.T, color = 'g')23 edge_labels = np.where(np.arange(WT_g.edges.indices.shape[0]) < g.edges.indices.shape[0], 0, 1)24 edge_arrows = np.where(np.arange(WT_g.edges.indices.shape[0]) < g.edges.indices.shape[0], 0, 1)25 plot_lattice(WT_g, edge_arrows = edge_arrows, ax = ax, edge_labels = edge_labels)26def test_multi_graphs():27 """The following graph has vertices with edges that link the same vertex together,28 this checks that clockwise edges about handles them correctly as part of the Weaire-Thorpe process"""29 g = Lattice(30 vertices = np.array([[0.5,0.7], [0.5,0.3]]),31 edge_indices = np.array([[0,1],[0,0],[0,1],[1,1]]),32 edge_crossing = np.array([[0,0],[1,0],[1,0],[1,0]]),33 )34 ordered_edge_indices = clockwise_edges_about(vertex_i = 0, g=g)35 solveable, edge_labels = edge_color(g, n_colors = 3, fixed = enumerate(ordered_edge_indices))36 WT_g = vertices_to_triangles(g, edge_labels)37 edge_labels = np.where(np.arange(WT_g.edges.indices.shape[0]) < g.edges.indices.shape[0], 0, 1)38 internal_edges = np.where(np.arange(WT_g.edges.indices.shape[0]) < g.edges.indices.shape[0], 0, 1)39 fig, axes = plt.subplots(ncols = 2)40 plot_lattice(g, edge_arrows = True, ax = axes[0])#, edge_labels = edge_labels)...

Full Screen

Full Screen

test_spark.py

Source:test_spark.py Github

copy

Full Screen

...32 short_spark = ''.join(sparkline.get_sparkline('data', spark_len=4))33 assert (short_spark == expected_short)34 long_spark = ''.join(sparkline.get_sparkline('data'))35 assert (long_spark == expected_long)36 def test_multi_graphs(self):37 expected_continous = '__▁▁▂▂▃▃▄▄▅▅▆▆▇▇'38 expected_spotty = '_ ▁ ▂ ▃ ▄ ▅ ▆ ▇ '39 continous_vals = range(1, 17)40 sparkline = Sparkline(len(continous_vals))41 start = int(time.time()) - len(continous_vals)42 for val in continous_vals:43 sparkline.add(start + val, 'continous', val)44 if val % 2 == 1:45 sparkline.add(start + val, 'spotty', val)46 continous = ''.join(sparkline.get_sparkline('continous'))47 spotty = ''.join(sparkline.get_sparkline('spotty'))48 assert (continous == expected_continous)...

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 yandex-tank 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