How to use finalize_options method in avocado

Best Python code snippet using avocado_python

install_data.py

Source:install_data.py Github

copy

Full Screen

...161 162 # Return type of the function 'run'163 return stypy_return_type_59601164 @norecursion165 def finalize_options(type_of_self, localization, *varargs, **kwargs):166 global module_type_store167 # Assign values to the parameters with defaults168 defaults = []169 # Create a new context for function 'finalize_options'170 module_type_store = module_type_store.open_function_context('finalize_options', 21, 4, False)171 # Assigning a type to the variable 'self' (line 22)172 module_type_store.set_type_of(stypy.reporting.localization.Localization(__file__, 22, 4), 'self', type_of_self)173 174 # Passed parameters checking function175 install_data.finalize_options.__dict__.__setitem__('stypy_localization', localization)176 install_data.finalize_options.__dict__.__setitem__('stypy_type_of_self', type_of_self)177 install_data.finalize_options.__dict__.__setitem__('stypy_type_store', module_type_store)178 install_data.finalize_options.__dict__.__setitem__('stypy_function_name', 'install_data.finalize_options')179 install_data.finalize_options.__dict__.__setitem__('stypy_param_names_list', [])180 install_data.finalize_options.__dict__.__setitem__('stypy_varargs_param_name', None)181 install_data.finalize_options.__dict__.__setitem__('stypy_kwargs_param_name', None)182 install_data.finalize_options.__dict__.__setitem__('stypy_call_defaults', defaults)183 install_data.finalize_options.__dict__.__setitem__('stypy_call_varargs', varargs)184 install_data.finalize_options.__dict__.__setitem__('stypy_call_kwargs', kwargs)185 install_data.finalize_options.__dict__.__setitem__('stypy_declared_arg_number', 1)186 arguments = process_argument_values(localization, type_of_self, module_type_store, 'install_data.finalize_options', [], None, None, defaults, varargs, kwargs)187 if is_error_type(arguments):188 # Destroy the current context189 module_type_store = module_type_store.close_function_context()190 return arguments191 # Initialize method data192 init_call_information(module_type_store, 'finalize_options', localization, [], arguments)193 194 # Default return type storage variable (SSA)195 # Assigning a type to the variable 'stypy_return_type'196 module_type_store.set_type_of(stypy.reporting.localization.Localization(__file__, 0, 0), 'stypy_return_type', None)197 198 199 # ################# Begin of 'finalize_options(...)' code ##################200 201 # Call to set_undefined_options(...): (line 22)202 # Processing the call arguments (line 22)203 str_59604 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 22, 35), 'str', 'install')204 205 # Obtaining an instance of the builtin type 'tuple' (line 23)206 tuple_59605 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 23, 36), 'tuple')207 # Adding type elements to the builtin type 'tuple' instance (line 23)208 # Adding element type (line 23)209 str_59606 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 23, 36), 'str', 'install_lib')210 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 23, 36), tuple_59605, str_59606)211 # Adding element type (line 23)212 str_59607 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 23, 51), 'str', 'install_dir')213 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 23, 36), tuple_59605, str_59607)214 215 216 # Obtaining an instance of the builtin type 'tuple' (line 24)217 tuple_59608 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 24, 36), 'tuple')218 # Adding type elements to the builtin type 'tuple' instance (line 24)219 # Adding element type (line 24)220 str_59609 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 24, 36), 'str', 'root')221 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 24, 36), tuple_59608, str_59609)222 # Adding element type (line 24)223 str_59610 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 24, 44), 'str', 'root')224 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 24, 36), tuple_59608, str_59610)225 226 227 # Obtaining an instance of the builtin type 'tuple' (line 25)228 tuple_59611 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 25, 36), 'tuple')229 # Adding type elements to the builtin type 'tuple' instance (line 25)230 # Adding element type (line 25)231 str_59612 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 25, 36), 'str', 'force')232 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 25, 36), tuple_59611, str_59612)233 # Adding element type (line 25)234 str_59613 = get_builtin_python_type_instance(stypy.reporting.localization.Localization(__file__, 25, 45), 'str', 'force')235 add_contained_elements_type(stypy.reporting.localization.Localization(__file__, 25, 36), tuple_59611, str_59613)236 237 # Processing the call keyword arguments (line 22)238 kwargs_59614 = {}239 # Getting the type of 'self' (line 22)240 self_59602 = module_type_store.get_type_of(stypy.reporting.localization.Localization(__file__, 22, 8), 'self', False)241 # Obtaining the member 'set_undefined_options' of a type (line 22)242 set_undefined_options_59603 = module_type_store.get_type_of_member(stypy.reporting.localization.Localization(__file__, 22, 8), self_59602, 'set_undefined_options')243 # Calling set_undefined_options(args, kwargs) (line 22)244 set_undefined_options_call_result_59615 = invoke(stypy.reporting.localization.Localization(__file__, 22, 8), set_undefined_options_59603, *[str_59604, tuple_59605, tuple_59608, tuple_59611], **kwargs_59614)245 246 247 # ################# End of 'finalize_options(...)' code ##################248 # Teardown call information249 teardown_call_information(localization, arguments)250 251 # Storing the return type of function 'finalize_options' in the type store252 # Getting the type of 'stypy_return_type' (line 21)253 stypy_return_type_59616 = module_type_store.get_type_of(stypy.reporting.localization.Localization(__file__, 21, 4), 'stypy_return_type')254 module_type_store.store_return_type_of_current_context(stypy_return_type_59616)255 256 # Destroy the current context257 module_type_store = module_type_store.close_function_context()258 259 # Return type of the function 'finalize_options'260 return stypy_return_type_59616261 @norecursion...

Full Screen

Full Screen

setup.py

Source:setup.py Github

copy

Full Screen

...3from os import getenv4from distutils.command.build_ext import build_ext as _build_ext5from distutils.command.install_lib import install_lib as _install_lib6class build_ext(_build_ext):7 def finalize_options(self):8 _build_ext.finalize_options(self)9 self.build_lib = build_lib10 self.build_temp = build_tmp11class install_lib(_install_lib):12 def finalize_options(self):13 _install_lib.finalize_options(self)14 self.build_dir = build_lib15cflags = ['-fno-strict-aliasing', '-Wno-write-strings']16cflags += getenv('CFLAGS', '').split()17build_lib = getenv('PYTHON_EXTBUILD_LIB')18build_tmp = getenv('PYTHON_EXTBUILD_TMP')19libtraceevent = getenv('LIBTRACEEVENT')20liblk = getenv('LIBLK')21ext_sources = [f.strip() for f in file('util/python-ext-sources')22 if len(f.strip()) > 0 and f[0] != '#']23perf = Extension('perf',24 sources = ext_sources,25 include_dirs = ['util/include'],26 extra_compile_args = cflags,27 extra_objects = [libtraceevent, liblk],...

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