test_cmd
Unit tests for command line execution.
Classes
Test class for the command-line apexpy interface. |
Module Contents
- class test_cmd.TestCommandLine[source]
Bases:
object
Test class for the command-line apexpy interface.
- execute_command_line(command, command_kwargs=None, pipe_out=False)[source]
Execute the command and load data from self.outfile
- Parameters:
command (list or str) – List or string containing command to execute using subprocess
command_kwargs (dict or NoneType) – Dict containing optional kwargs for subprocess.Popen command or None if using defaults. (default=None)
pipe_out (bool) – Return pipe output instead of output from a data file if True (default=False)
- Returns:
data (np.array, NoneType, or subprocess.Popen attribute) – Numpy array of data from output file, None if no file was created, or the requested output from the pipe command.
- test_convert_w_datetime(date_str)[source]
Test command line with different date and time specification.
- Parameters:
date_str (str) – Input date string
- test_convert_stdin_stdout_w_height_flags(height, out_list)[source]
Test use of pipe input to command-line call with height flags.
- Parameters:
height (str) – String specifying height with command line options
out_list (list) – List of expected output values