orsopy.fileio.tests.test_base module

Tests for fileio.base module

class orsopy.fileio.tests.test_base.TestHeaderClass(methodName='runTest')[source]

Bases: TestCase

Testing general class functionalities of ORSO Header.

test_resolve_any()[source]
test_resolve_datetime()[source]
test_resolve_dictof()[source]
test_resolve_list()[source]
test_resolve_tuple()[source]
test_subsubclass()[source]
test_unexpected_error()[source]

Test that any unforeseen exception in the resolve function gets reported as ORSOResolveError.

test_empty_creation()[source]

Make a class that tests all cases of the empty method.

test_dict_conversion()[source]
class orsopy.fileio.tests.test_base.TestErrorValue(methodName='runTest')[source]

Bases: TestCase

Testing the Value class.

test_single_value()[source]

Creation of an object with a magnitude and unit.

test_optionals()[source]

Creation of an object with a magnitude and unit.

test_sigma()[source]

Creation of an object with a magnitude and unit.

test_to_yaml()[source]

Transform to yaml.

test_no_value_to_yaml()[source]

Transform to yaml with a non-optional ORSO item.

test_optionals_to_yaml()[source]

Transform to yaml.

test_user_data()[source]
class orsopy.fileio.tests.test_base.TestValue(methodName='runTest')[source]

Bases: TestCase

Testing the Value class.

test_single_value()[source]

Creation of an object with a magnitude and unit.

test_list_warning()[source]

Creation of an object with a a list of values and a unit.

test_bad_unit()[source]

Rejection of non-ASCII units.

test_to_yaml()[source]

Transform to yaml.

test_no_magnitude_to_yaml()[source]

Transform to yaml with a non-optional ORSO item.

test_user_data()[source]
test_unit_conversion()[source]
class orsopy.fileio.tests.test_base.TestComplexValue(methodName='runTest')[source]

Bases: TestCase

Testing the Value class.

test_single_value()[source]

Creation of an object with a magnitude and unit.

test_list_warning()[source]

Creation of an object with a list of values and a unit.

test_bad_unit()[source]

Rejection of non-ASCII units.

test_to_yaml()[source]

Transform to yaml.

test_no_magnitude_to_yaml()[source]

Transform to yaml with a non-optional ORSO item.

test_unit_conversion()[source]
class orsopy.fileio.tests.test_base.TestValueVector(methodName='runTest')[source]

Bases: TestCase

Testing the ValueVector class

test_single_value()[source]

Creation of an object with three dimensions and unit.

test_list_warns()[source]

Creation of an object with three dimensions of lists and unit.

test_bad_unit()[source]

Rejection of non-ASCII unit.

test_to_yaml()[source]

Transform to yaml.

test_two_dimensional_to_yaml()[source]

Transform to yaml with only two dimensions.

test_unit_conversion()[source]
class orsopy.fileio.tests.test_base.TestValueRange(methodName='runTest')[source]

Bases: TestCase

Testing the ValueRange class

test_single_value()[source]

Creation of an object with a max, min and unit.

test_list_warns()[source]

Creation of an object of a list of max and list of min and a unit.

test_bad_unit()[source]

Rejection of non-ASCII unit.

test_to_yaml()[source]

Transform to yaml.

test_no_upper_to_yaml()[source]

Transform to yaml with no max.

test_no_lower_to_yaml()[source]

Transform to yaml with no min.

test_unit_conversion()[source]
class orsopy.fileio.tests.test_base.TestPerson(methodName='runTest')[source]

Bases: TestCase

Testing the Person class

test_creation()[source]

Creation with no email.

test_creation_with_contact()[source]

Creation with an email.

test_creation_with_multiline()[source]
test_to_yaml()[source]

Transform to yaml with no email.

test_no_affiliation_to_yaml()[source]

Transform to yaml without affiliation.

test_no_name_to_yaml()[source]

Transform to yaml without name.

test_email_to_yaml()[source]

Transform to yaml with an email.

class orsopy.fileio.tests.test_base.TestColumn(methodName='runTest')[source]

Bases: TestCase

Testing the Column class

test_creation()[source]

Creation of a column.

test_bad_unit()[source]

Rejection of non-ASCII unit.

test_to_yaml()[source]

Transformation to yaml.

test_no_description_to_yaml()[source]

Transformation to yaml.

class orsopy.fileio.tests.test_base.TestErrorColumn(methodName='runTest')[source]

Bases: TestCase

Testing the Column class

test_creation()[source]

Creation of a column.

test_bad_type()[source]

Rejection of non-ASCII unit.

test_bad_distribution()[source]

Rejection of non-ASCII unit.

test_to_yaml()[source]

Transformation to yaml.

test_minimal_to_yaml()[source]

Transformation to yaml.

test_sigma_conversion()[source]
class orsopy.fileio.tests.test_base.TestFile(methodName='runTest')[source]

Bases: TestCase

Testing the File class.

test_creation_for_nonexistent_file()[source]

Creation of a file that does not exist.

test_to_yaml_for_nonexistent_file()[source]

Transformation to yaml of a file that does not exist.

test_creation_for_existing_file()[source]

Creation for a file that does exist with a given modified date.

test_to_yaml_for_existing_file()[source]

Transformation to yaml a file that does exist with a given modified date.

test_creation_for_existing_file_no_mod_time()[source]

Transformation to yaml a file that does exist without a given modified date.

test_to_yaml_for_existing_file_no_mod_time()[source]

Transformation to yaml a file that does exist without a given modified date.

test_not_orso()[source]