Best Python code snippet using hypothesis
run_tests.py
Source:run_tests.py
1from __future__ import absolute_import, division, print_function2from libtbx import test_utils3import libtbx.load_env4from libtbx import easy_run5import libtbx.load_env6general_tests = [7 "$D/suitename/unit-test/FullTest.py",8 #9 "$D/regression/tst_sampled_model_density.py",10 # pair interaction11 "$D/pair_interaction/tst_00.py",12 "$D/pair_interaction/tst_01.py",13 "$D/pair_interaction/tst_02.py",14 "$D/pair_interaction/tst_03.py",15 "$D/pair_interaction/tst_04.py",16 "$D/pair_interaction/tst_05.py",17 # ions SVM18 "$D/ions/svm/tst_classifier.py",19 "$D/ions/tst_pick_ca_svm.py",20 "$D/ions/tst_pickle.py",21 # ion picking22 "$D/ions/tst_parameters.py",23 "$D/ions/tst_pick_ca.py",24 "$D/ions/tst_pick_mg.py",25 "$D/ions/tst_pick_approx_zn.py",26 "$D/ions/tst_validate_ca.py",27 "$D/ions/tst_validate_mg.py",28 "$D/ions/tst_symmetry_axis.py",29 "$D/ions/tst_utils.py",30 # TLS31 "$D/regression/tls/tst_tls.py",32 "$D/regression/tls/tst_tls_analysis.py",33 "$D/regression/tls/tst_tls_utils.py",34 "$D/regression/tls/tst_tls_optimise_amplitudes.py",35 "$D/regression/tls/tst_get_t_scheme.py",36 ["$D/regression/tls/tst_tls_refinement_fft.py", "--comprehensive", "--random_seed=2679941"],37 "$D/regression/tls/tst_u_tls_vs_u_ens_00.py",38 "$D/regression/tls/tst_u_tls_vs_u_ens_01.py",39 "$D/regression/tls/tst_u_tls_vs_u_ens_02.py",40 "$D/regression/tls/tst_u_tls_vs_u_ens_03.py",41 "$D/regression/tls/tst_u_tls_vs_u_ens_04.py",42 "$D/regression/tls/tst_tls_as_xyz.py",43 "$D/regression/tls/tst_formula_t_S_10_vs_11_2igd.py",44 "$D/regression/tls/tst_formula_t_S_10_vs_11_4muy.py",45 #46 "$D/regression/tst_angle.py",47 "$D/rotamer/tst_rotamer_eval.py",48 "$D/rotamer/tst_geostd_vs_sidechain_angles_props.py",49 "$D/monomer_library/tst_idealized_aa.py",50 "$D/regression/tst_ml_estimate.py",51 "$D/density_modification/tst_density_modification.py",52 "$D/geometry_restraints/tst_ramachandran.py",53 "$D/geometry_restraints/tst_manager.py",54 "$D/geometry_restraints/external.py",55 "$D/regression/tst_map_type_parser.py",56 "$D/rsr/tst.py",57 "$D/polygon/tst.py",58 "$D/polygon/tst_gui.py",59 "$D/chemical_components/tst.py",60 "$D/regression/tst_add_h_to_water.py",61 "$D/rotamer/rotamer_eval.py",62 "$D/wwpdb/tst_standard_geometry_cif.py",63 "$D/regression/tst_pdbtools.py",64 "$D/real_space/tst.py",65 "$D/ias/tst_ias.py",66 "$D/refinement/tst_fit_rotamers.py",67 "$D/regression/tst_process_predicted_model.py",68 "$D/regression/tst_domains_from_pae.py",69 ["$D/refinement/tst_anomalous_scatterer_groups.py", "P3"],70 "$D/refinement/tst_rigid_body.py",71 "$D/refinement/tst_rigid_body_groups_from_pdb_chains.py",72 "$D/refinement/tst_refinement_flags.py",73 "$D/geometry_restraints/torsion_restraints/tst_reference_model.py",74 "$D/geometry_restraints/torsion_restraints/tst_reference_model_ligands.py",75 # model tests, some more elsewhere in this file76 "$D/regression/model/tst_model_mtrix.py",77 "$D/regression/model/tst_model_ncs.py",78 "$D/regression/model/tst_model_2.py",79 "$D/regression/model/tst_model_biomt_mtrix.py",80 "$D/regression/model/tst_model_neutralize_scatterers.py",81 "$D/regression/model/tst_model_set_hydrogen_bond_length.py",82 "$D/regression/model/tst_model_cart_ref_restraints.py",83 "$D/regression/model/tst_model_tors_ref_restraints.py",84 "$D/regression/model/tst_model_remove_alternative_conformations.py",85 "$D/regression/model/tst_model_get_vdw_radii.py",86 "$D/regression/model/tst_model_dedeuterate.py",87 #88 "$D/regression/tst_fmodel.py",89 "$D/regression/tst_utils.py",90 "$D/regression/tst_alignment.py",91 ["$D/regression/tst_fmodel_fd.py", "P31"],92 "$D/maps/tst_composite_omit_map.py",93 "$D/maps/tst_composite_omit_map_2.py",94 "$D/maps/tst_composite_omit_map_3.py",95 "$D/maps/tst_correlation.py",96 "$D/regression/ncs/tst_ncs_utils.py",97 "$D/regression/ncs/tst_ncs_restraints_group_list.py",98 "$D/regression/ncs/tst_ncs_search.py",99 "$D/regression/ncs/tst_ncs_search_flips.py",100 "$D/regression/ncs/tst_restraints.py",101 "$D/regression/tst_geometry_minimization.py",102 "$D/regression/tst_special_term_at_end.py",103 ["$D/ncs/ncs.py", "exercise"],104 "$D/regression/tst_adp_restraints.py",105 "$D/regression/tst_metal_link_1.py",106 # Xtriage107 "$D/scaling/tst_scaling.py",108 "$D/scaling/tst_outlier.py",109 "$D/scaling/tst_absences.py",110 "$D/scaling/tst_xtriage.py",111 "$D/scaling/tst_xtriage_twin_analyses.py",112 "$D/scaling/matthews.py",113 "$D/scaling/absence_likelihood.py",114 ["$D/scaling/thorough_outlier_test.py", "P21"],115 "$D/twinning/probabalistic_detwinning.py",116 #"$D/scaling/tst_xtriage_massage_data.py",117 # monomer library118 "$D/monomer_library/tst_rna_sugar_pucker_analysis.py",119 "$D/monomer_library/tst_cif_types.py",120 "$D/monomer_library/tst_motif.py",121 "$D/monomer_library/tst_cif_triage.py",122 "$D/monomer_library/tst_rotamer_utils.py",123 "$D/monomer_library/tst_selection.py",124 "$D/monomer_library/tst_tyr_from_gly_and_bnz.py",125 "$D/monomer_library/tst_pdb_interpretation.py",126 "$D/monomer_library/tst_rna_dna_interpretation.py",127 "$D/monomer_library/tst_protein_interpretation.py",128 "$D/monomer_library/tst_pdb_interpretation_ncs_processing.py",129 "$D/monomer_library/tst_geo_reduce_for_tardy.py",130 "$D/monomer_library/tst_chg.py",131 "$D/monomer_library/tst_neutron_distance.py",132 "$D/monomer_library/tst_carbo_linking.py",133 "$D/monomer_library/tst_glyco_hand.py",134 "$D/monomer_library/tst_glyco_coordination.py",135 "$D/monomer_library/tst_paral_geo.py",136 #137 "$D/regression/tst_altloc_remediate.py",138 "$D/hydrogens/build_hydrogens.py",139 "$D/hydrogens/tst.py",140 "$D/hydrogens/tst_add_hydrogen.py",141 "$D/hydrogens/tst_add_hydrogen_2.py",142 "$D/hydrogens/tst_validate_H.py",143 "$D/hydrogens/tst_connectivity.py",144 "$D/hydrogens/tst_riding_coefficients.py",145 "$D/hydrogens/tst_riding_manager.py",146 "$D/hydrogens/tst_parameterization_1.py",147 "$D/hydrogens/tst_parameterization_2.py",148 "$D/hydrogens/tst_parameterization_3.py",149 "$D/hydrogens/tst_parameterization_4.py",150 "$D/hydrogens/tst_parameterization_5.py",151 "$D/hydrogens/tst_parameterization_6.py",152 "$D/hydrogens/tst_parameterization_7.py",153 "$D/hydrogens/tst_parameterization_8.py",154 "$D/hydrogens/tst_parameterization_9.py",155 "$D/hydrogens/tst_riding_fd_1.py",156 "$D/hydrogens/tst_riding_fd_2.py",157 "$D/hydrogens/tst_riding_fd_3.py",158 "$D/hydrogens/tst_riding_fd_4.py",159 "$D/hydrogens/tst_riding_fd_5.py",160 "$D/hydrogens/tst_riding_minimize.py",161 "$D/max_lik/tst_maxlik.py",162 "$D/masks/tst_masks.py",163 "$D/masks/tst_asu_mask.py",164 "$D/max_lik/tst_max_lik.py",165 "$D/dynamics/tst_cartesian_dynamics.py",166 "$D/dynamics/tst_sa.py",167 #168 "$D/examples/f_model_manager.py",169 # Bulk solvent170 "$D/bulk_solvent/tst_bulk_solvent_and_scaling.py",171 "$D/bulk_solvent/tst_fit_kexpb_to_ktotal.py",172 "$D/bulk_solvent/tst_scaler.py",173 "$D/bulk_solvent/tst_flat_nonuniform.py",174 "$D/bulk_solvent/tst_aniso_scaler.py",175 "$D/bulk_solvent/tst_kb_sol_u_star_fd.py",176 "$D/bulk_solvent/tst_mosaic.py",177 #178 "$D/invariant_domain.py",179 # restraints180 "$D/regression/tst_psi_phi_extraction.py",181 "$D/secondary_structure/tst.py",182 "$D/secondary_structure/tst_insertion_codes.py",183 "$D/secondary_structure/tst_segid.py",184 "$D/geometry_restraints/tst_reference_coordinate.py",185 "$D/geometry_restraints/tst_reference_coordinate2.py",186 "$D/geometry_restraints/tst_c_beta_restraints.py",187 "$D/geometry_restraints/torsion_restraints/tst_torsion_ncs.py",188 "$D/conformation_dependent_library/tst_cdl.py",189 "$D/conformation_dependent_library/tst_cdl_esd.py",190 "$D/conformation_dependent_library/tst_rdl.py",191 "$D/conformation_dependent_library/tst_hpdl.py",192 "$D/conformation_dependent_library/tst_cis_c_n_ca.py",193 "$D/conformation_dependent_library/cdl_svl_database.py",194 "$D/conformation_dependent_library/tst_pH_mechanism.py",195 "$D/conformation_dependent_library/tst_mcl_01.py",196 "$D/conformation_dependent_library/tst_mcl_02.py",197 "$D/conformation_dependent_library/tst_mcl_03.py",198 "$D/regression/tst_find_ss_structure.py",199 "$D/regression/tst_fix_rotamer_outliers.py",200 "$D/regression/tst_chain_comparison.py",201 "$D/regression/tst_regularize_from_pdb.py",202 "$D/regression/tst_find_ncs.py",203 "$D/regression/tst_minimize_chain.py",204 "$D/regression/tst_sequence_validation.py",205 "$D/regression/tst_prune_model.py",206 "$D/regression/tst_real_space_correlation.py",207 "$D/regression/tst_examples.py",208 "$D/regression/tst_sort_hetatms.py",209 "$D/regression/tst_schrodinger_interface.py",210 # real-space tools211 "$D/refinement/real_space/tst_aa_residue_axes_and_clusters.py",212 "$D/refinement/real_space/tst_fit_residue_0.py",213 "$D/refinement/real_space/tst_fit_residue_0H.py",214 "$D/refinement/real_space/tst_fit_residue_1.py",215 "$D/refinement/real_space/tst_fit_residue_1H.py",216 "$D/refinement/real_space/tst_fit_residue_2.py",217 "$D/refinement/real_space/tst_fit_residue_3.py",218 "$D/refinement/real_space/tst_fit_residue_4.py",219 "$D/refinement/real_space/tst_fit_residue_5.py",220 "$D/refinement/real_space/tst_fit_residue_6.py",221 "$D/refinement/real_space/tst_fit_residues_1.py",222 "$D/refinement/real_space/tst_fit_residues_1H.py",223 "$D/refinement/real_space/tst_fit_residues_2.py",224 "$D/refinement/real_space/tst_fit_residues_3.py",225 "$D/refinement/real_space/tst_fit_residues_4.py",226 "$D/refinement/real_space/tst_fit_residues_5.py",227 "$D/refinement/real_space/tst_fit_residues_6.py",228 "$D/refinement/real_space/tst_fit_residues_selection.py",229 "$D/refinement/real_space/tst_fit_water.py",230 "$D/refinement/real_space/tst_flipbase.py",231 "$D/refinement/real_space/tst_individual_sites_1.py",232 "$D/refinement/real_space/tst_individual_sites_2.py",233 "$D/refinement/real_space/tst_individual_sites_3.py",234 "$D/refinement/real_space/tst_monitor.py",235 "$D/refinement/real_space/tst_rigid_body.py",236 "$D/refinement/real_space/tst_weight.py",237 #238 "$D/idealized_aa_residues/tst.py",239 #240 "$D/regression/tst_dssp.py",241 "$D/regression/tst_validation_summary.py",242 "$D/regression/tst_maps_misc.py",243 "$D/regression/tst_cablam.py",244 "$D/regression/tst_anomalous_substructure.py",245 "$D/regression/tst_map_coeffs_simple.py",246 #247 "$D/regression/tst_fmodel_no_cryst1.py",248 "$D/regression/tst_fmodel_misc.py",249 "$D/regression/tst_isomorphous_difference_misc.py",250 "$D/regression/tst_dynamics_cli.py",251 "$D/ligands/tst_xtal_screens.py",252 "$D/ligands/tst_ready_set_utils.py",253 "$D/regression/tst_mtz2map.py",254 # ringer255 "$D/regression/tst_ringer.py",256 "$D/ringer/tst_emringer.py",257 "$D/ringer/tst_em_rscc.py",258 # validation/molprobity259 "$D/regression/tst_probe.py",260 "$D/regression/tst_reduce.py",261 "$D/validation/regression/tst_molprobity_arguments.py",262 "$D/validation/regression/tst_waters.py",263 "$D/validation/regression/tst_keep_hydrogens.py",264 "$D/validation/regression/tst_mp_geo.py",265 "$D/validation/regression/tst_rotalyze.py",266 "$D/validation/regression/tst_ramalyze.py",267 "$D/validation/regression/tst_ramalyze2.py",268 "$D/validation/regression/tst_clashscore.py",269 "$D/validation/regression/tst_restraints.py",270 "$D/validation/regression/tst_omegalyze.py",271 "$D/validation/regression/tst_rna_validate.py",272 "$D/validation/regression/tst_model_properties.py",273 "$D/validation/regression/tst_molprobity_2.py",274 "$D/validation/regression/tst_molprobity_3.py",275 "$D/validation/regression/tst_hydrogen_addition_clashscore.py",276 "$D/validation/regression/tst_symmetry_SS.py",277 "$D/validation/regression/tst_do_flips_clashscore.py",278 "$D/validation/regression/tst_find_region_max_value.py",279 #280 "$D/refinement/tst_select_best_starting_model.py",281 "$D/regression/tst_refine_anomalous_substructure.py",282 "$D/regression/tst_helix_sheet_recs_as_pdb_files.py",283 "$D/regression/tst_command_line_input.py",284 "$D/regression/tst_cif_as_mtz_wavelengths.py",285 "$D/building/tst_extend_sidechains.py",286 "$D/building/tst_extend_sidechains_2.py",287 # alt confs288 "$D/building/alternate_conformations/tst_backrub_conformers.py",289 "$D/building/alternate_conformations/tst_shear_conformers.py",290 "$D/building/alternate_conformations/tst_partial_omit_map.py",291 "$D/disorder/tst.py",292 "$D/disorder/tst_backbone.py",293 "$D/disorder/tst_analyze_model.py",294 #295 "$D/refinement/tst_group.py",296 "$D/refinement/tst_group_2.py",297 "$D/secondary_structure/build/tst_1.py",298 "$D/secondary_structure/build/tst_2.py",299 "$D/secondary_structure/build/tst_3.py",300 "$D/secondary_structure/build/tst_io.py",301 "$D/secondary_structure/build/tst_ss_id_ncs.py",302 "$D/regression/tst_loop_closure.py",303 "$D/regression/model_idealization/tst_nomap_01.py",304 "$D/regression/model_idealization/tst_nomap_02.py",305 "$D/regression/model_idealization/tst_nomap_03.py",306 "$D/regression/model_idealization/tst_nomap_04.py",307 "$D/regression/model_idealization/tst_withmap_01.py",308 "$D/regression/model_idealization/tst_withmap_02.py",309 "$D/regression/model_idealization/tst_withmap_03.py",310 "$D/regression/model_idealization/tst_withmap_04.py",311 "$D/regression/model_idealization/tst_withmap_05.py",312 "$D/regression/model_idealization/tst_withmap_06.py",313 "$D/regression/model_idealization/tst_ligands.py",314 "$D/regression/model_idealization/tst_with_mtz.py",315 "$D/utils/tst_switch_rotamers.py",316 "$D/refinement/tst_occupancy_selections.py",317 "$D/regression/ncs/tst_minimization_ncs_constraints.py",318 "$D/regression/ncs/tst_minimization_ncs_constraints2.py",319 "$D/regression/ncs/tst_minimization_ncs_constraints3.py",320 "$D/regression/ncs/tst_minimization_ncs_constraints_real_space.py",321 "$D/monomer_library/tst_correct_hydrogens.py",322 "$D/monomer_library/tst_deuterium_terminii.py",323 # automatic linking324 "$D/monomer_library/tst_superpose_ideal.py",325 "$D/monomer_library/tst_iron_sulfur_clusters.py",326 #327 "$D/scaling/tst_plan_sad_experiment.py",328 #329 "$D/regression/tst_models_to_from_chains.py",330 # tNCS331 "$D/regression/tncs/tst_pair.py",332 "$D/regression/tncs/tst_epsfac_and_radius.py",333 "$D/regression/tncs/tst_fd.py",334 "$D/regression/tncs/tst_moments.py",335 #336 "$D/regression/tst_rank_scale_map.py",337 "$D/regression/tst_polder.py",338 "$D/regression/tst_polder_1.py",339 "$D/regression/tst_polder_2.py",340 "$D/regression/tst_polder_3.py",341 "$D/regression/tst_polder_box.py",342 "$D/regression/tst_polder_ccs.py",343 "$D/regression/tst_map_model_cc.py",344 "$D/regression/tst_model_map.py",345 #346 "$D/regression/tst_validate_ligands.py",347 #348 "$D/regression/tst_cis_trans_peptide_link.py",349 "$D/regression/tst_apply_cif_restraints.py",350 "$D/regression/tst_multi_residue_class.py",351 "$D/regression/tst_superpose.py",352 "$D/monomer_library/tst_server.py",353 #354 "$D/geometry/tests/tst_altloc.py",355 "$D/geometry/tests/tst_asa.py",356 "$D/geometry/tests/tst_clash.py",357 "$D/geometry/tests/tst_indexing.py",358 "$D/geometry/tests/tst_shared_types.py",359 "$D/geometry/tests/tst_sphere_surface_sampling.py",360 "$D/geometry/tests/tst_topology.py",361 #362 "$D/nci/tst_hbond.py",363 "$D/wwpdb/tst_rcsb_web_services.py",364 "$D/wwpdb/tst_utils.py",365 "$D/monomer_library/tst_all_cif_files.py",366 "$D/refinement/tst_misc.py",367 "$D/refinement/tst_real_space_simple.py",368 "$D/scaling/tst_bayesian_estimator.py",369 "$D/scaling/tst_mean_f_rms_f.py",370 "$D/scaling/tst_sigmaa.py",371 "$D/scaling/tst_massage_data.py",372 "$D/ions/tst_geometries.py",373 "$D/ions/tst_pick_k.py",374 "$D/ions/tst_environment.py",375 "$D/regression/tst_table_one.py",376 "$D/regression/tst_msa.py",377 "$D/regression/tst_build_alt_confs.py",378 "$D/regression/tst_cc_star.py",379 "$D/regression/tst_fmodel_2.py",380 "$D/regression/tst_rigid_bond_test.py",381 "$D/validation/regression/tst_cablam.py",382 "$D/building/tst_make_library.py",383 "$D/regression/real_space_refine_chain/tst_00.py",384 "$D/regression/real_space_refine_chain/tst_01.py",385 "$D/conformation_dependent_library/tst_omega_cdl.py",386 "$D/regression/fix_cablam/tst_basic_cl_operations.py",387 "$D/regression/fix_cablam/tst_single_outliers_surroundings.py",388 "$D/regression/fix_cablam/tst_one_resid_rotation.py",389 "$D/regression/fix_cablam/tst_insertion_codes.py",390 #391 "$D/regression/tst_scattering_type_registry.py",392 "$D/atomic_environment_vectors/tst.py",393 #394 "$D/building/ligands/tst_00.py",395 # Tests that were not in the list and caused us to fail as of 10/6/2021396 "$D/regression/tst_ligand_ncs.py",397 "$D/regression/tst_origin_ids.py",398 "$D/regression/model/tst_model_ramachandran.py",399 "$D/regression/model_idealization/tst_ext_map_01.py",400 "$D/validation/regression/tst_mp_geo_endtoend.py",401 "$D/validation/regression/tst_mp_geo_chiral_volume_cases.py",402 "$D/conformation_dependent_library/tst_multi_residue_rna.py",403 "$D/conformation_dependent_library/tst_cdl_nucleotides.py",404 "$D/conformation_dependent_library/tst_rna_dna_fragments.py",405 "$D/conformation_dependent_library/testing_utils.py",406 "$D/conformation_dependent_library/tst_poly_ca_multi_residue.py",407 "$D/conformation_dependent_library/tst_mutli_residue.py",408 ]409molprobity_tests = [410 "$D/regression/tst_rama_z_01.py",411 "$D/regression/pdb_interpretation/tst_edits.py",412 "$D/regression/pdb_interpretation/tst_edits_actions.py",413 "$D/regression/tst_add_arrows_on_plot.py",414 "$D/regression/model/tst_model.py",415 "$D/regression/tst_reduce_timeout.py",416 "$D/regression/tst_altloc_chain_break.py",417 "$D/regression/ncs/tst_geometry_minimization_ncs_constraints.py",418 "$D/regression/tst_clashes.py",419 "$D/validation/regression/tst_cbetadev.py",420 "$D/regression/tst_statistics_output.py",421 "$D/regression/tst_geo_min_restraints_phil.py",422 "$D/regression/tst_model_vs_map.py",423 # validation/molprobity424 "$D/validation/regression/tst_nqh_minimize.py",425 "$D/validation/regression/tst_molprobity_1.py",426 "$D/validation/regression/tst_molprobity_4.py",427 "$D/validation/regression/tst_molprobity_5.py",428 "$D/validation/regression/tst_experimental.py",429 "$D/validation/regression/tst_cablam_2.py",430 # automatic linking431 ["$D/monomer_library/tst_metal_coordination.py", "1"],432 ["$D/monomer_library/tst_metal_coordination.py", "2"],433 ["$D/monomer_library/tst_metal_coordination.py", "3"],434 ["$D/monomer_library/tst_linking.py", "1"],435 ["$D/monomer_library/tst_linking.py", "2"],436 ["$D/monomer_library/tst_linking.py", "3"],437 ["$D/monomer_library/tst_linking.py", "4"],438 ["$D/monomer_library/tst_linking.py", "5"],439 ["$D/monomer_library/tst_linking.py", "6"],440 ["$D/monomer_library/tst_linking.py", "7"],441 ["$D/monomer_library/tst_linking.py", "8"],442 ["$D/monomer_library/tst_linking.py", "9"],443 ["$D/monomer_library/tst_linking.py", "10"],444 ["$D/monomer_library/tst_linking.py", "11"],445 ["$D/monomer_library/tst_linking.py", "12"],446 ["$D/monomer_library/tst_linking.py", "13"],447 ["$D/monomer_library/tst_linking.py", "14"],448 ["$D/monomer_library/tst_linking.py", "15"],449 ["$D/monomer_library/tst_linking.py", "16"],450 ["$D/monomer_library/tst_linking.py", "17"],451 ["$D/monomer_library/tst_linking.py", "18"],452 ["$D/monomer_library/tst_linking.py", "19"],453 ["$D/monomer_library/tst_linking.py", "20"],454 ["$D/monomer_library/tst_linking.py", "21"],455 ["$D/monomer_library/tst_linking.py", "22"],456 ["$D/monomer_library/tst_linking.py", "23"],457 ["$D/monomer_library/tst_linking.py", "24"],458 ["$D/monomer_library/tst_linking.py", "25"],459 ["$D/monomer_library/tst_linking.py", "26"],460 ["$D/monomer_library/tst_linking.py", "27"],461 ["$D/monomer_library/tst_linking.py", "28"],462 ["$D/monomer_library/tst_linking.py", "29"],463 ["$D/monomer_library/tst_linking.py", "30"],464 ["$D/monomer_library/tst_linking.py", "31"],465 ["$D/monomer_library/tst_linking.py", "32"],466]467if libtbx.env.has_module(name="probe"):468 tst_list = tuple(general_tests + molprobity_tests)469else:470 print("Skipping %d MolProbity tests: probe not configured"%len(molprobity_tests))471 tst_list = tuple(general_tests)472def run():473 assert easy_run.call("libtbx.find_untested mmtbx True")==0474 build_dir = libtbx.env.under_build("mmtbx")475 dist_dir = libtbx.env.dist_path("mmtbx")476 test_utils.run_tests(build_dir, dist_dir, tst_list)477if (__name__ == "__main__"):...
func_ninfo2line.py
Source:func_ninfo2line.py
1#!/usr/bin/env python2# -*- coding: utf-8 -*-3'''4@author: Naoto Hori5'''6#0 1 2 3 4 5 6 7 8 9 10 7#0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678#bond 1 1 1 1 2 1 2 4.8010 1.0000 1.0000 62.9100 SU9def bondlength2line(bl):10 s = 'bond'11 s += ' %6i' % (bl.id,)12 s += ' %6i %6i' % (bl.iunit1, bl.iunit2)13 s += ' %6i %6i' % (bl.imp1, bl.imp2)14 s += ' %6i %6i' % (bl.imp1un, bl.imp2un)15 s += ' %12.4f' % (bl.native,)16 s += ' %12.4f' % (bl.factor,)17 s += ' %12.4f' % (bl.correct_mgo,)18 s += ' %12.4f' % (bl.coef,)19 s += ' ' + bl.type20 s += '\n'21 return s 22#0 1 2 3 4 5 6 7 8 9 10 23#01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456724#fene 1 1 1 1 2 1 2 4.8010 2.0000 1.0000 SU25def fene2line(fene):26 s = 'fene'27 s += ' %6i' % (fene.id,)28 s += ' %6i %6i' % (fene.iunit1, fene.iunit2)29 s += ' %6i %6i' % (fene.imp1, fene.imp2)30 s += ' %6i %6i' % (fene.imp1un, fene.imp2un)31 s += ' %12.4f' % (fene.native,)32 #s += ' %12.4f' % (fene.dist2,)33 s += ' %12.4f' % (fene.factor,)34 s += ' %12.4f' % (fene.coef,)35 #s += ' ' + fene.type36 s += '\n'37 return s 38def bondangle2line(ba):39 s = 'angl'40 s += ' %6i' % (ba.id,)41 s += ' %6i %6i' % (ba.iunit1, ba.iunit2)42 s += ' %6i %6i %6i' % (ba.imp1, ba.imp2, ba.imp3)43 s += ' %6i %6i %6i' % (ba.imp1un, ba.imp2un, ba.imp3un)44 s += ' %12.4f' % (ba.native,)45 s += ' %12.4f' % (ba.factor,)46 s += ' %12.4f' % (ba.correct_mgo,)47 s += ' %12.4f' % (ba.coef,)48 s += ' ' + ba.type49 s += '\n'50 return s51#0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1652#0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789053#aicg13 1 1 1 1 2 3 1 2 3 6.4310 1.0000 1.0000 1.1594 0.1500 ppp54def aicg132line(a13):55 s = 'aicg13'56 s += ' %6i' % (a13.id,)57 s += ' %6i %6i' % (a13.iunit1, a13.iunit2)58 s += ' %6i %6i %6i' % (a13.imp1, a13.imp2, a13.imp3)59 s += ' %6i %6i %6i' % (a13.imp1un, a13.imp2un, a13.imp3un)60 s += ' %12.4f' % (a13.native,)61 s += ' %12.4f' % (a13.factor,)62 s += ' %12.4f' % (a13.correct_mgo,)63 s += ' %12.4f' % (a13.coef,)64 s += ' %12.4f' % (a13.wid,)65 s += ' ' + a13.type66 s += '\n'67 return s 68def dihedral2line(dih):69 s = 'dihd'70 s += ' %6i' % (dih.id,)71 s += ' %6i %6i' % (dih.iunit1, dih.iunit2)72 s += ' %6i %6i %6i %6i' % (dih.imp1, dih.imp2, dih.imp3, dih.imp4)73 s += ' %6i %6i %6i %6i' % (dih.imp1un, dih.imp2un, dih.imp3un, dih.imp4un)74 s += ' %12.4f' % (dih.native,)75 s += ' %12.4f' % (dih.factor,)76 s += ' %12.4f' % (dih.correct_mgo,)77 s += ' %12.4f %12.4f' % (dih.coef, dih.coef_3)78 s += ' ' + dih.type79 s += '\n'80 return s 81def aicgdih2line(adih):82 s = 'aicgdih'83 s += ' %6i' % (adih.id,)84 s += ' %6i %6i' % (adih.iunit1, adih.iunit2)85 s += ' %6i %6i %6i %6i' % (adih.imp1, adih.imp2, adih.imp3, adih.imp4)86 s += ' %6i %6i %6i %6i' % (adih.imp1un, adih.imp2un, adih.imp3un, adih.imp4un)87 s += ' %12.4f' % (adih.native,)88 s += ' %12.4f' % (adih.factor,)89 s += ' %12.4f' % (adih.correct_mgo,)90 s += ' %12.4f %12.4f' % (adih.coef, adih.wid)91 s += ' ' + adih.type92 s += '\n'93 return s 94#** icon iunit1-iunit2 imp1 - imp2 imp1un-imp2un go_nat factor_go dummy coef_go95#contact 5 1 1 2 5 2 5 6.1894 1.0000 1 0.9408 U-G96def contact2line(con):97 s = 'contact'98 s += ' %6i' % (con.id,)99 s += ' %6i %6i' % (con.iunit1, con.iunit2)100 s += ' %6i %6i' % (con.imp1, con.imp2)101 s += ' %6i %6i' % (con.imp1un, con.imp2un)102 s += ' %11.4f' % (con.native,)103 s += ' %11.4f' % (con.factor,)104 s += ' %6i' % (con.dummy,)105 s += ' %11.4f' % (con.coef,)106 s += ' ' + con.type107 s += '\n'108 return s 109#** LJ iunit1-iunit2 imp1 - imp2 imp1un-imp2un distance coef110#LJ 5 1 1 2 5 2 5 6.1894 1.0000111def LJ2line(con):112 s = 'LJ'113 s += ' %6i' % (con.id,)114 s += ' %6i %6i' % (con.iunit1, con.iunit2)115 s += ' %6i %6i' % (con.imp1, con.imp2)116 s += ' %6i %6i' % (con.imp1un, con.imp2un)117 s += ' %11.4f' % (con.native,)118 s += ' %11.4f' % (con.coef,)119 s += '\n'120 return s 121def basepair2line(bp):122 s = 'basepair'123 s += ' %6i' % (bp.id,)124 s += ' %6i %6i' % (bp.iunit1, bp.iunit2)125 s += ' %6i %6i' % (bp.imp1, bp.imp2)126 s += ' %6i %6i' % (bp.imp1un, bp.imp2un)127 s += ' %11.4f' % (bp.native,)128 s += ' %11.4f' % (bp.factor,)129 s += ' %6i' % (bp.dummy,)130 s += ' %11.4f' % (bp.coef,)131 s += ' ' + bp.type132 s += ' %i' % (bp.nhb,)133 s += '\n'134 return s 135def basestack2line(bs):136 s = 'basestack'137 s += ' %6i' % (bs.id,)138 s += ' %6i %6i' % (bs.iunit1, bs.iunit2)139 s += ' %6i %6i' % (bs.imp1, bs.imp2)140 s += ' %6i %6i' % (bs.imp1un, bs.imp2un)141 s += ' %11.4f' % (bs.native,)142 s += ' %11.4f' % (bs.factor,)143 s += ' %6i' % (bs.dummy,)144 s += ' %11.4f' % (bs.coef,)145 s += ' ' + bs.type146 s += '\n'147 return s 148def basestackDTdist2line(bs):149 s = 'bs-dist'150 s += ' %6i' % (bs.id,)151 s += ' %6i %6i' % (bs.iunit1, bs.iunit2)152 s += ' %6i %6i' % (bs.imp1, bs.imp2)153 s += ' %6i %6i' % (bs.imp1un, bs.imp2un)154 s += ' %8.4f' % (bs.h,)155 s += ' %8.4f' % (bs.s,)156 s += ' %6.2f' % (bs.Tm,)157 s += ' %11.4f' % (bs.native,)158 s += ' %11.4f' % (bs.coef,)159 s += ' ' + bs.type160 s += '\n'161 return s 162def basestackDTdih2line(bs):163 s = 'bs-dihd'164 s += ' %6i' % (bs.id,)165 s += ' %6i' % (bs.dih1_id,)166 s += ' %6i %6i' % (bs.dih1_iunit1, bs.dih1_iunit2)167 s += ' %6i %6i %6i %6i' % (bs.dih1_imp1, bs.dih1_imp2, bs.dih1_imp3, bs.dih1_imp4)168 s += ' %6i %6i %6i %6i' % (bs.dih1_imp1un, bs.dih1_imp2un, bs.dih1_imp3un, bs.dih1_imp4un)169 s += ' %11.4f' % (bs.dih1_native,)170 s += ' %11.4f' % (bs.dih1_coef,)171 s += ' ' + bs.dih1_type172 s += '\n'173 s += 'bs-dihd'174 s += ' %6i' % (bs.id,)175 s += ' %6i' % (bs.dih2_id,)176 s += ' %6i %6i' % (bs.dih2_iunit1, bs.dih2_iunit2)177 s += ' %6i %6i %6i %6i' % (bs.dih2_imp1, bs.dih2_imp2, bs.dih2_imp3, bs.dih2_imp4)178 s += ' %6i %6i %6i %6i' % (bs.dih2_imp1un, bs.dih2_imp2un, bs.dih2_imp3un, bs.dih2_imp4un)179 s += ' %11.4f' % (bs.dih2_native,)180 s += ' %11.4f' % (bs.dih2_coef,)181 s += ' ' + bs.dih2_type182 s += '\n'183 return s 184def hbondDTdist2line(hb):185 s = 'hb-dist'186 s += ' %6i' % (hb.id,)187 s += ' %6i %6i' % (hb.iunit1, hb.iunit2)188 s += ' %6i %6i' % (hb.imp1, hb.imp2)189 s += ' %6i %6i' % (hb.imp1un, hb.imp2un)190 s += ' %11.4f' % (hb.factor,)191 s += ' %11.4f' % (hb.native,)192 s += ' %11.4f' % (hb.coef,)193 if hb.sectert:194 s += ' %s' % hb.sectert195 if hb.nHB:196 s += ' %i' % hb.nHB197 if hb.atoms1 and hb.atoms1:198 for a1, a2 in zip(hb.atoms1, hb.atoms2):199 s += ' %s %s' % (a1,a2)200 s += '\n'201 return s 202def hbondDTangl2line(hb):203 s = 'hb-angl'204 s += ' %6i' % (hb.id,)205 s += ' %6i' % (hb.ang1_id,)206 s += ' %6i %6i' % (hb.ang1_iunit1, hb.ang1_iunit2)207 s += ' %6i %6i %6i' % (hb.ang1_imp1, hb.ang1_imp2, hb.ang1_imp3)208 s += ' %6i %6i %6i' % (hb.ang1_imp1un, hb.ang1_imp2un, hb.ang1_imp3un)209 s += ' %11.4f' % (hb.ang1_native,)210 s += ' %11.4f' % (hb.ang1_coef,)211 s += '\n'212 s += 'hb-angl'213 s += ' %6i' % (hb.id,)214 s += ' %6i' % (hb.ang2_id,)215 s += ' %6i %6i' % (hb.ang2_iunit1, hb.ang2_iunit2)216 s += ' %6i %6i %6i' % (hb.ang2_imp1, hb.ang2_imp2, hb.ang2_imp3)217 s += ' %6i %6i %6i' % (hb.ang2_imp1un, hb.ang2_imp2un, hb.ang2_imp3un)218 s += ' %11.4f' % (hb.ang2_native,)219 s += ' %11.4f' % (hb.ang2_coef,)220 s += '\n'221 return s 222def hbondDTdih2line(hb):223 s = 'hb-dihd'224 s += ' %6i' % (hb.id,)225 s += ' %6i' % (hb.dih0_id,)226 s += ' %6i %6i' % (hb.dih0_iunit1, hb.dih0_iunit2)227 s += ' %6i %6i %6i %6i' % (hb.dih0_imp1, hb.dih0_imp2, hb.dih0_imp3, hb.dih0_imp4)228 s += ' %6i %6i %6i %6i' % (hb.dih0_imp1un, hb.dih0_imp2un, hb.dih0_imp3un, hb.dih0_imp4un)229 s += ' %11.4f' % (hb.dih0_native,)230 s += ' %11.4f' % (hb.dih0_coef,)231 s += '\n'232 s += 'hb-dihd'233 s += ' %6i' % (hb.id,)234 s += ' %6i' % (hb.dih1_id,)235 s += ' %6i %6i' % (hb.dih1_iunit1, hb.dih1_iunit2)236 s += ' %6i %6i %6i %6i' % (hb.dih1_imp1, hb.dih1_imp2, hb.dih1_imp3, hb.dih1_imp4)237 s += ' %6i %6i %6i %6i' % (hb.dih1_imp1un, hb.dih1_imp2un, hb.dih1_imp3un, hb.dih1_imp4un)238 s += ' %11.4f' % (hb.dih1_native,)239 s += ' %11.4f' % (hb.dih1_coef,)240 s += '\n'241 s += 'hb-dihd'242 s += ' %6i' % (hb.id,)243 s += ' %6i' % (hb.dih2_id,)244 s += ' %6i %6i' % (hb.dih2_iunit1, hb.dih2_iunit2)245 s += ' %6i %6i %6i %6i' % (hb.dih2_imp1, hb.dih2_imp2, hb.dih2_imp3, hb.dih2_imp4)246 s += ' %6i %6i %6i %6i' % (hb.dih2_imp1un, hb.dih2_imp2un, hb.dih2_imp3un, hb.dih2_imp4un)247 s += ' %11.4f' % (hb.dih2_native,)248 s += ' %11.4f' % (hb.dih2_coef,)249 s += '\n'250 return s 251def tertiarystackDTdist2line(tst):252 s = 'tbs-dist'253 s += ' %6i' % (tst.id,)254 s += ' %6i %6i' % (tst.iunit1, tst.iunit2)255 s += ' %6i %6i' % (tst.imp1, tst.imp2)256 s += ' %6i %6i' % (tst.imp1un, tst.imp2un)257 s += ' %11.4f' % (tst.factor,)258 s += ' %11.4f' % (tst.native,)259 s += ' %11.4f' % (tst.coef,)260 s += ' %+2i %+2i' % (tst.excess1, tst.excess2)261 s += '\n'262 return s 263def tertiarystackDTangl2line(tst):264 s = 'tbs-angl'265 s += ' %6i' % (tst.id,)266 s += ' %6i' % (tst.ang1_id,)267 s += ' %6i %6i' % (tst.ang1_iunit1, tst.ang1_iunit2)268 s += ' %6i %6i %6i' % (tst.ang1_imp1, tst.ang1_imp2, tst.ang1_imp3)269 s += ' %6i %6i %6i' % (tst.ang1_imp1un, tst.ang1_imp2un, tst.ang1_imp3un)270 s += ' %11.4f' % (tst.ang1_native,)271 s += ' %11.4f' % (tst.ang1_coef,)272 s += '\n'273 s += 'tbs-angl'274 s += ' %6i' % (tst.id,)275 s += ' %6i' % (tst.ang2_id,)276 s += ' %6i %6i' % (tst.ang2_iunit1, tst.ang2_iunit2)277 s += ' %6i %6i %6i' % (tst.ang2_imp1, tst.ang2_imp2, tst.ang2_imp3)278 s += ' %6i %6i %6i' % (tst.ang2_imp1un, tst.ang2_imp2un, tst.ang2_imp3un)279 s += ' %11.4f' % (tst.ang2_native,)280 s += ' %11.4f' % (tst.ang2_coef,)281 s += '\n'282 return s 283def tertiarystackDTdih2line(tst):284 s = 'tbs-dihd'285 s += ' %6i' % (tst.id,)286 s += ' %6i' % (tst.dih0_id,)287 s += ' %6i %6i' % (tst.dih0_iunit1, tst.dih0_iunit2)288 s += ' %6i %6i %6i %6i' % (tst.dih0_imp1, tst.dih0_imp2, tst.dih0_imp3, tst.dih0_imp4)289 s += ' %6i %6i %6i %6i' % (tst.dih0_imp1un, tst.dih0_imp2un, tst.dih0_imp3un, tst.dih0_imp4un)290 s += ' %11.4f' % (tst.dih0_native,)291 s += ' %11.4f' % (tst.dih0_coef,)292 s += '\n'293 s += 'tbs-dihd'294 s += ' %6i' % (tst.id,)295 s += ' %6i' % (tst.dih1_id,)296 s += ' %6i %6i' % (tst.dih1_iunit1, tst.dih1_iunit2)297 s += ' %6i %6i %6i %6i' % (tst.dih1_imp1, tst.dih1_imp2, tst.dih1_imp3, tst.dih1_imp4)298 s += ' %6i %6i %6i %6i' % (tst.dih1_imp1un, tst.dih1_imp2un, tst.dih1_imp3un, tst.dih1_imp4un)299 s += ' %11.4f' % (tst.dih1_native,)300 s += ' %11.4f' % (tst.dih1_coef,)301 s += '\n'302 s += 'tbs-dihd'303 s += ' %6i' % (tst.id,)304 s += ' %6i' % (tst.dih2_id,)305 s += ' %6i %6i' % (tst.dih2_iunit1, tst.dih2_iunit2)306 s += ' %6i %6i %6i %6i' % (tst.dih2_imp1, tst.dih2_imp2, tst.dih2_imp3, tst.dih2_imp4)307 s += ' %6i %6i %6i %6i' % (tst.dih2_imp1un, tst.dih2_imp2un, tst.dih2_imp3un, tst.dih2_imp4un)308 s += ' %11.4f' % (tst.dih2_native,)309 s += ' %11.4f' % (tst.dih2_coef,)310 s += '\n'...
bench.py
Source:bench.py
1import sys2import os3from xml.dom.minidom import getDOMImplementation4from timeit import Timer5import subprocess6sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)),7 '..', 'build', 'default', 'benchmarks'))8TIMES = 100000009TIMES1 = TIMES/410import testapi_pybindgen11import testapi_boost12import testapi_swig13import testapi_sip14def bench(mod, dom, elem):15 def bench():16 return mod.func1()17 tst = elem.appendChild(dom.createElement('test'))18 tst.setAttribute("description", "call function with no arguments")19 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))20 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))21 22 def bench():23 return mod.func2(1.0, 2.0, 3.0)24 tst = elem.appendChild(dom.createElement('test'))25 tst.setAttribute("description", "call function taking 3 doubles")26 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))27 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))28 def bench():29 return mod.Multiplier()30 tst = elem.appendChild(dom.createElement('test'))31 tst.setAttribute("description", "call class constructor with no arguments")32 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))33 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))34 def bench():35 return mod.Multiplier(3.0)36 tst = elem.appendChild(dom.createElement('test'))37 tst.setAttribute("description", "call class constructor with double")38 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))39 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))40 obj = mod.Multiplier(3.0)41 def bench():42 return obj.GetFactor()43 tst = elem.appendChild(dom.createElement('test'))44 tst.setAttribute("description", "call simple method")45 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))46 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))47 obj = mod.Multiplier(3.0)48 def bench():49 return obj.SetFactor()50 tst = elem.appendChild(dom.createElement('test'))51 tst.setAttribute("description", "call overloaded method 1")52 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))53 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))54 obj = mod.Multiplier(3.0)55 def bench():56 return obj.SetFactor(1.0)57 tst = elem.appendChild(dom.createElement('test'))58 tst.setAttribute("description", "call overloaded method 2")59 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))60 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))61 obj = mod.Multiplier(3.0)62 def bench():63 return obj.Multiply(5.0)64 tst = elem.appendChild(dom.createElement('test'))65 tst.setAttribute("description", "call non-overridden virtual method with double")66 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES)))67 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))68 class M(mod.Multiplier):69 def Multiply(self, value):70 return super(M, self).Multiply(value)71 obj = M(2.0)72 def bench():73 return obj.Multiply(5.0)74 tst = elem.appendChild(dom.createElement('test'))75 tst.setAttribute("description", "call python-overridden virtual method from Python")76 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES1)))77 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))78 def bench():79 return mod.call_virtual_from_cpp(obj, 5.0)80 tst = elem.appendChild(dom.createElement('test'))81 tst.setAttribute("description", "call python-overridden virtual method from C++")82 tst.setAttribute("time", repr(Timer(bench).timeit(TIMES1)))83 print "%s (%s): %s" % (tst.tagName, tst.getAttribute('description'), tst.getAttribute('time'))84def main():85 impl = getDOMImplementation()86 dom = impl.createDocument(None, "pybindgen-benchmarks", None)87 top = dom.documentElement88 env = top.appendChild(dom.createElement('environment'))89 env.appendChild(dom.createElement('compiler')).appendChild(dom.createTextNode(90 subprocess.Popen(["g++", "-v"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]))91 env.appendChild(dom.createElement('python')).appendChild(dom.createTextNode(92 sys.version))93 env.appendChild(dom.createElement('swig')).appendChild(dom.createTextNode(94 subprocess.Popen(["swig", "-version"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]))95 env.appendChild(dom.createElement('boost_python')).appendChild(dom.createTextNode(96 subprocess.Popen(["dpkg", "-s", "libboost-python-dev"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]))97 env.appendChild(dom.createElement('pybindgen')).appendChild(dom.createTextNode(98 subprocess.Popen(["bzr", "version-info", '--check-clean'],99 stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]))100 env.appendChild(dom.createElement('cpu')).appendChild(dom.createTextNode(101 file("/proc/cpuinfo").read()))102 if len(sys.argv) == 3:103 env.appendChild(dom.createElement('CXXFLAGS')).appendChild(dom.createTextNode(sys.argv[2]))104 res = top.appendChild(dom.createElement('results'))105 print "pybindgen results:"106 pbg = res.appendChild(dom.createElement('pybindgen'))107 pbg.setAttribute("module-file-size", repr(os.stat("build/default/benchmarks/testapi_pybindgen.so").st_size))108 bench(testapi_pybindgen, dom, pbg)109 print "boost_python results:"110 bp = res.appendChild(dom.createElement('boost_python'))111 bp.setAttribute("module-file-size", repr(os.stat("build/default/benchmarks/testapi_boost.so").st_size))112 bench(testapi_boost, dom, bp)113 print "swig results:"114 sw = res.appendChild(dom.createElement('swig'))115 sw.setAttribute("module-file-size", repr(os.stat("build/default/benchmarks/_testapi_swig.so").st_size))116 sw.setAttribute("module-python-file-size", repr(os.stat("build/default/benchmarks/testapi_swig.py").st_size))117 bench(testapi_swig, dom, sw)118 print "sip results:"119 sip = res.appendChild(dom.createElement('sip'))120 sip.setAttribute("module-file-size", repr(os.stat("build/default/benchmarks/testapi_sip.so").st_size))121 bench(testapi_sip, dom, sip)122 if len(sys.argv) == 3:123 f = open(sys.argv[1], "wb")124 dom.writexml(f, "", " ", "\n")125 f.close()126if __name__ == '__main__':...
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!!