Best Python code snippet using avocado_python
_base.py
Source: _base.py
...100 def zap(self):101 self._cache_key_str = None102 def get_cache_file_path(self):103 return self.get_cache_dir_path("%s.txz" % self.get_cache_key_str())104 def get_cache_dirs(self, relpath=None):105 return self.install_info.get_cache_dirs(106 fspath.join_relpath(self.CACHE_DIR_RELPATH, relpath)107 )108 def get_cache_dir_path(self, relpath=None):109 return self.get_cache_dirs(relpath).get_path()110 def get_cache_search_dirs(self, relpath=None, check_exist=False):111 return self.install_info.get_cache_search_dirs(112 fspath.join_relpath(self.CACHE_DIR_RELPATH, relpath),113 check_exist=check_exist114 )115 def get_arch_keys(self):116 return misc.iter_dedup(117 filter(118 # skip unset arch attrs,119 # and also "usermode" archs120 lambda w: (w and w != "um"),121 (122 self.source_info.arch,123 self.source_info.subarch,...
test_system.py
Source: test_system.py
...39 # a custom clean install40 os.environ.pop('CACHE', None)41 os.environ.pop('SHARED_CACHE', None)42 expected_base_dir = os.path.expanduser('~/cache')43 data_dir = get_cache_dirs()[0]44 assert_equal(data_dir, expected_base_dir)45 expected_base_dir = os.path.join(tmpdir, 'cache')46 os.environ['CACHE'] = expected_base_dir47 data_dir = get_cache_dirs()[0]48 assert_equal(data_dir, expected_base_dir)49 expected_base_dir = os.path.join(tmpdir, 'cache_shared')50 os.environ['SHARED_CACHE'] = expected_base_dir51 data_dir = get_cache_dirs()[0]52 assert_equal(data_dir, expected_base_dir)53 expected_base_dir = os.path.join(tmpdir, 'cache')54 os.environ.pop('CACHE', None)55 os.environ.pop('SHARED_CACHE', None)56 data_dir = get_cache_dirs(expected_base_dir)[0]...
unmask_adhd.py
Source: unmask_adhd.py
...8from modl.utils.system import get_cache_dirs, get_output_dir9smoothing_fwhm = 610n_jobs = 2011dataset = fetch_adhd()12memory = Memory(cachedir=get_cache_dirs()[0])13imgs_list = dataset.rest14root = dataset.root15mask_img = dataset.mask16artifact_dir = join(get_output_dir(), 'unmasked', 'adhd_6')17if not os.path.exists(artifact_dir):18 os.makedirs(artifact_dir)19create_raw_rest_data(imgs_list,20 root=root,21 raw_dir=artifact_dir,22 overwrite=False,23 mock=False,24 masker_params=dict(smoothing_fwhm=smoothing_fwhm,25 detrend=True,26 standardize=True,...
Check out the latest blogs from LambdaTest on this topic:
Hola Testers! Hope you all had a great Thanksgiving weekend! To make this time more memorable, we at LambdaTest have something to offer you as a token of appreciation.
In addition to the four values, the Agile Manifesto contains twelve principles that are used as guides for all methodologies included under the Agile movement, such as XP, Scrum, and Kanban.
JavaScript is one of the most widely used programming languages. This popularity invites a lot of JavaScript development and testing frameworks to ease the process of working with it. As a result, numerous JavaScript testing frameworks can be used to perform unit testing.
When I started writing tests with Cypress, I was always going to use the user interface to interact and change the application’s state when running tests.
The rapid shift in the use of technology has impacted testing and quality assurance significantly, especially around the cloud adoption of agile development methodologies. With this, the increasing importance of quality and automation testing has risen enough to deliver quality work.
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!