Esempio n. 1
0
def test_topology_input_error():
    """Test topology input error."""
    parser = argparse.ArgumentParser()
    lc.add_topology_arg(parser)
    with pytest.raises(SystemExit):
        parser.parse_args([])
Esempio n. 2
0
__status__ = 'Production'

__doc__ += (f'{tcore.ref_mda}'
            f'{tcore.ref_mda_selection}'
            f'{tcore.ref_plottemplates_param}')

_help = 'Calculate angular oscillation of a plane along the trajectory.'
_name = 'pangle'

ap = libcli.CustomParser(
    description=_BANNER + __doc__,
    formatter_class=argparse.RawDescriptionHelpFormatter,
)

libcli.add_version_arg(ap)
libcli.add_topology_arg(ap)
libcli.add_trajectories_arg(ap)
libcli.add_plane_selection_arg(ap)
libcli.add_angle_unit_arg(ap)
libcli.add_reference_frame_arg(ap)
libcli.add_slice_arg(ap)
libcli.add_data_export_arg(ap)
libcli.add_plot_arg(ap)


def _ap():
    return ap


def main(topology,
         trajectories,
Esempio n. 3
0
def test_topology_input(cmd, expected):
    """Test topology argument."""
    parser = argparse.ArgumentParser()
    lc.add_topology_arg(parser)
    v = vars(parser.parse_args(cmd.split()))
    assert v['topology'] == expected