common.test.functional package

Submodules

common.test.functional.Error_test module

Unittests for Error.py

class common.test.functional.Error_test.ErrorTest(methodName='runTest')

Bases: unittest.case.TestCase

test()

common.test.functional.OptionsParser_test module

Unittests for OptionsParser

class common.test.functional.OptionsParser_test.OptionsParserTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_add_option()
test_expand_options()
test_get_options()
test_init()
test_parse()
test_repr()

common.test.functional.Pipeline_test module

Unittests for Pipeline

class common.test.functional.Pipeline_test.CompositeTaskTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test()
class common.test.functional.Pipeline_test.TaskTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_filter_options()
test_get_options()
test_get_task_info()
test_init()
test_update_options()

common.test.functional.Processor_test module

Unittests for Processor.py

class common.test.functional.Processor_test.BaseProcessorTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test__check_and_expand_task_options(mock_get_tasks_of_sequence)
test_get_sequence_identifiers(mock_get)
test_get_sequence_options(mock_get_sequence_options)
test_get_sequence_params(mock_get_sequence_params)
test_show_sequence_identifiers(mock_get_sequence_identifiers)
test_show_sequence_options(mock_show_sequence_options)
class common.test.functional.Processor_test.FunctionsTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_check_excessive_number_of_jobs_false()
test_check_excessive_number_of_jobs_true()
test_estimate_total_process_time()
class common.test.functional.Processor_test.LocalProcessorTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test__process_jobs(mock_task)
test_get_job_result()
test_run(mock_get_seq, mock_process_jobs, mock_get_joblist, mock_options)
class common.test.functional.Processor_test.ProcessorTest(methodName='runTest')

Bases: unittest.case.TestCase

setUp(mock_dpu_io, mock_get_jobids, mock_dpu_get_info, muck_getversion)
test__process_jobs(mock_submitjobs, mock_getjobid)
test_add_to_stored_jobs()
test_cancel_job(mock_deletekey)
test_get_dpu_identifiers(mock_dpu_get_info)
test_get_job_result(mock_get_log)
test_get_jobids()
test_get_log(mock_retrievejobs)
test_get_onelog(mock_getonelog)
test_get_status(mock_get_status, mock_get_jobids)
test_get_syslogs(mock_getsyslogs)
test_getlogs(mock_get_status, mock_get_jobids)
test_info()
test_is_finished_false(mock_getstatus)
test_is_finished_true(mock_getstatus)
test_parse_jobids()
test_run(mock_process_jobs, mock_expand, mock_get_joblist, mock_get_sequence_identifiers)
test_select_dpu(mock_dpu, mock_close, mock_get_info, mock_getversion)
test_set_dpu_client(mock_get_info, mock_getversion)
test_show_dpu_identifiers(mock_get_dpu_identifiers)
test_wait_for_jobs()

common.test.functional.ShellCommand_test module

Unittests for ShellCommand.py

class common.test.functional.ShellCommand_test.ShellCommandTest(methodName='runTest')

Bases: unittest.case.TestCase

test_is_known_command()
test_pipecommand()
test_pipecommand_err()
test_run()

common.test.functional.URL_test module

Unittests for URL.py

class common.test.functional.URL_test.URLTest(methodName='runTest')

Bases: unittest.case.TestCase

test_combineURI()
test_parseURI()

common.test.functional.datetime_test module

Tests datetime functionality

These tests are meant to test the expected behaviour of the Python datetime module, in particular that it is backwards compatible from Python 2.5 to Python 2.3

class common.test.functional.datetime_test.test_datetime(methodName='runTest')

Bases: unittest.case.TestCase

test_calculate_absdate()

Test calculating the Absolute date value

test_calculate_abstime()

Test calculating the Absolute time value

test_calculate_mjd()

Test calculating the Modified Julian Date value for a datetime object

test_callable_now()

Test whether the datetime class has a callable “now” attribute

test_callable_utcnow()

Test whether the datetime class has a callable “utcnow” attribute

test_comparisons_of_datetimes()

Test <, <=, >=, etc. of two datetime objects

test_equality_of_datetimes()

Test equality of two datetimes

test_list_operations()

Test operations such as min, max, sort on lists of datetime objects

test_set_datetime()

Test defining a datetime object

test_set_timedelta()

Test defining a timedelta object

test_strftime()

Test the string formatting of datetime objects

test_use_timedelta_1()

Test (1) adding a timedelta object to a datetime object

test_use_timedelta_2()

Test (2) adding a timedelta object to a datetime object

common.test.functional.import_everything_test module

Try to import every module that can be found

common.test.functional.import_everything_test.import_everything(path, prefix)

Imports all modules in path except those which are blacklisted.

class common.test.functional.import_everything_test.test_import_everything(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_common()

common.test.functional.mathematical_test module

Test mathematics functionality

class common.test.functional.mathematical_test.LfitTest(methodName='runTest')

Bases: unittest.case.TestCase

test_lfit()
class common.test.functional.mathematical_test.get_mean_and_stdev_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_get_mean_and_stdev()
class common.test.functional.mathematical_test.get_median_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_get_median()
class common.test.functional.mathematical_test.get_weighted_mean_and_error_chisquare_corrected_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_get_weighted_mean_and_error_chisquare_corrected()
class common.test.functional.mathematical_test.get_weighted_mean_and_error_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_get_weighted_mean_and_error()
class common.test.functional.mathematical_test.get_weighted_mean_and_stdev_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_get_weighted_mean_and_stdev()
class common.test.functional.mathematical_test.kappa_sigma_clip_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_kappa_sigma_clip()
class common.test.functional.mathematical_test.mad_estimator_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_mad_estimator()
class common.test.functional.mathematical_test.median_absolute_deviation_test(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_median_absolute_deviation()

common.test.functional.md5sum_test module

Unittests for md5sum.py

class common.test.functional.md5sum_test.MD5SUMTest(methodName='runTest')

Bases: unittest.case.TestCase

test()

common.test.functional.mpfit_test module

Tests mpfit functionality

class common.test.functional.mpfit_test.testmpfit(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_mpfit1()

Test based on example 2 in mpfit.

Main purpose of the test is to determine whether fitting works at all, because mpfit is highly sensitive to numpy deprecations.

common.test.functional.typed_list_test module

Tests for typed_list and lazy_typed_list

class common.test.functional.typed_list_test.A

Bases: object

class common.test.functional.typed_list_test.lazy_typed_list_instantiation_test(methodName='runTest')

Bases: unittest.case.TestCase

test_append_good()
test_getitem()
class common.test.functional.typed_list_test.lazy_typed_list_test(methodName='runTest')

Bases: unittest.case.TestCase

test_append_bad()
test_append_good()
test_arith()
test_construction_bad()
test_contruction()
test_contruction_good()
test_extend_bad()
test_extend_good()
test_setitem_bad()
test_setitem_good()
class common.test.functional.typed_list_test.typed_list_test(methodName='runTest')

Bases: unittest.case.TestCase

test_append_bad()
test_append_good()
test_arith()
test_construction_bad()
test_contruction()
test_contruction_good()
test_extend_bad()
test_extend_good()
test_setitem_bad()
test_setitem_good()

common.test.functional.utilities_test module

Tests utilities functionality

class common.test.functional.utilities_test.test_altaz(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_altaz()
class common.test.functional.utilities_test.test_attribute_sorting(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
tearDown()
test_attrsort()
test_mysort()
class common.test.functional.utilities_test.test_coords(methodName='runTest')

Bases: unittest.case.TestCase

test_convert_coords()
class common.test.functional.utilities_test.test_datetime_other(methodName='runTest')

Bases: unittest.case.TestCase

test_absdate_to_datetime_1()
test_absdate_to_datetime_2()
test_add_days_1()
test_add_days_2()
test_days_in_year_1()
test_days_in_year_2()
test_subtract_days()
test_timedelta_to_seconds_1()
test_timedelta_to_seconds_2()
test_timedelta_to_seconds_3()
class common.test.functional.utilities_test.test_datetime_to_somethings(methodName='runTest')

Bases: unittest.case.TestCase

test_datetime_to_absdate()
test_datetime_to_abstime()
test_datetime_to_midnight_1()
test_datetime_to_midnight_2()
test_datetime_to_mjd()
class common.test.functional.utilities_test.test_fli(methodName='runTest')

Bases: unittest.case.TestCase

setUp()
test_fli()

Ephem is a more accurate way to calculate the FLI?

class common.test.functional.utilities_test.test_group_list(methodName='runTest')

Bases: unittest.case.TestCase

test_group_list()
class common.test.functional.utilities_test.test_mjd_to_stuff(methodName='runTest')

Bases: unittest.case.TestCase

test_mjd_longitude_to_last()
test_mjd_longitude_to_lmst()
test_mjd_to_gast()
test_mjd_to_gmst()
class common.test.functional.utilities_test.test_moon_stuff(methodName='runTest')

Bases: unittest.case.TestCase

test_get_fractional_lunar_illumination()
test_get_moon_phase()
test_get_moon_phase_fractional()
class common.test.functional.utilities_test.test_name_stuff(methodName='runTest')

Bases: unittest.case.TestCase

test_name_insert_suffix1()
test_name_insert_suffix2()
test_name_replace_suffix1()
test_name_replace_suffix2()
class common.test.functional.utilities_test.test_offset(methodName='runTest')

Bases: unittest.case.TestCase

test_angular_separation()
test_offset_in_arcsec()
class common.test.functional.utilities_test.test_ranges(methodName='runTest')

Bases: unittest.case.TestCase

test_list_to_ranges()
class common.test.functional.utilities_test.test_sort_dict_lists(methodName='runTest')

Bases: unittest.case.TestCase

test_sort_dict_lists()
class common.test.functional.utilities_test.test_str_to_datetime(methodName='runTest')

Bases: unittest.case.TestCase

This class tests the str_to_datetime function; the parsing of strings to create an internal Python datetime object.

test_timestring_1()
test_timestring_2()
test_timestring_3()
test_timestring_4()
test_timestring_5()
test_timestring_6()
test_timestring_7()
test_timestring_8()
class common.test.functional.utilities_test.test_strcompress(methodName='runTest')

Bases: unittest.case.TestCase

test_string1()

Module contents