How to use config_filename method in avocado

Best Python code snippet using avocado_python

usrp_rx_hrpt_nogui.py

Source:usrp_rx_hrpt_nogui.py Github

copy

Full Screen

...86 self.connect((self.gr_clock_recovery_mm_xx_0, 0), (self.gr_binary_slicer_fb_0, 0))87 self.connect((self.deframer, 0), (self.frame_sink, 0))88 self.connect((self.deframer, 0), (self.decoder, 0))89 self.connect((self.gr_binary_slicer_fb_0, 0), (self.deframer, 0))90 def set_config_filename(self, config_filename):91 self.config_filename = config_filename92 self._gain_config = ConfigParser.ConfigParser()93 self._gain_config.read(self.config_filename)94 if not self._gain_config.has_section('usrp_rx_hrpt'):95 self._gain_config.add_section('usrp_rx_hrpt')96 self._gain_config.set('usrp_rx_hrpt', 'gain', str(self.gain))97 self._gain_config.write(open(self.config_filename, 'w'))98 self._freq_config = ConfigParser.ConfigParser()99 self._freq_config.read(self.config_filename)100 if not self._freq_config.has_section('usrp_rx_hrpt'):101 self._freq_config.add_section('usrp_rx_hrpt')102 self._freq_config.set('usrp_rx_hrpt', 'freq', str(self.freq))103 self._freq_config.write(open(self.config_filename, 'w'))104 self._side_config = ConfigParser.ConfigParser()...

Full Screen

Full Screen

ellipses.py

Source:ellipses.py Github

copy

Full Screen

1import os2from bedsim.simulation import Simulation3from bedsim.sysgen.ellipse_grid import EllipseBenchmark, EllipseBenchmarkRandom4from bedsim.btools.animate import Animate 5from bedsim.btools.statprop import Statprop6def start():7 # 1. generate system8 gen = EllipseBenchmark()9 #gen = EllipseBenchmarkRandom()10 (n,k,phi) = (25, 2, 0.7) # 32^2=102411 gen.generate(n=n, k=k, phi=phi)12 config_filename = "bedsim/data/test/EllipseBenchmark-n%s-k%s-phi%s.h5" % (n,k,phi)13 14 try:15 os.remove(config_filename) # cleanup16 except FileNotFoundError:17 pass18 19 #gen.particle_data[0]['velocity']=[3.,0.5]20 #gen.particle_data[0]['pinned'] = True21 gen.save_to_file(config_filename)22 23 # 2. simulate system24 #sim = Simulation(config_filename=config_filename, output_filename=config_filename, system_lifetime=10, brownian_timestep=None, saving_timestep=0.02, verbose=True)25 #sim = Simulation(config_filename=config_filename, output_filename=config_filename, system_lifetime=10, brownian_timestep=0.1, saving_timestep=0.02, verbose=True)26 #sim = Simulation(config_filename=config_filename, output_filename=config_filename, system_lifetime=1, brownian_timestep=2, saving_timestep=0.02, verbose=True)27 sim = Simulation(config_filename=config_filename, output_filename=config_filename, system_lifetime=10, brownian_timestep=0.1, saving_timestep=0.02, verbose=True)28 #sim = Simulation(config_filename=config_filename, output_filename=config_filename, system_lifetime=0.2, brownian_timestep=0.1, saving_timestep=0.001, verbose=True)29 sim.start()30 31 # 3. animate32 Animate(input_filename=config_filename, output_filename=config_filename+".mp4")33 # 4. determine statistic data34 Statprop(input_filename=config_filename)35 '''36 config_filename2 = "bedsim/data/test/EllipseBenchmark-n%s-k%s-phi%s-2.h5" % (n,k,phi)37 try:38 os.remove(config_filename2) # cleanup39 except FileNotFoundError:40 pass41 sim2 = Simulation(config_filename=config_filename, output_filename=config_filename2, system_lifetime=20, brownian_timestep=0.1, saving_timestep=0.02, verbose=True)42 sim2.start()43 Animate(input_filename=config_filename2, output_filename=config_filename2+".mp4")44 Statprop(input_filename=config_filename2)45 '''46if __name__ == '__main__':...

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 avocado 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