tests Package

test_conversion_operators Module

class karld.tests.test_conversion_operators.TestConversion(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_apply_conversion_map()[source]

Ensure all the items in the conversion_map is applied.

test_apply_conversion_map_map()[source]

Ensure all the items in the conversion_map is applied.

test_get_number_as_int()[source]

Ensure a string with a number prefix returns an int.

test_must_int()[source]

Ensure a string not castable to a number raises a ValueError

class karld.tests.test_conversion_operators.TestGettersValueJoiner(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_join_stripped_gotten_value()[source]

Ensure joiner gets the values from data with the getters, coerce to str, strips padding whitespace and join with the separator.

class karld.tests.test_conversion_operators.TestValueJoiner(methodName='runTest')[source]

Bases: unittest.case.TestCase

test_join_stripped_values()[source]

Ensure joiner gets the values from data with the getter, coerce to str, strips padding whitespace and join with the separator.

test_loadump Module

test_run_together Module

test_unicode_io Module

class karld.tests.test_unicode_io.TestCSVToUnicodeReader(methodName='runTest')[source]

Bases: unittest.case.TestCase

Ensure unicode reader reads contents of a file iteratively and produces unicode sequences.

setUp()[source]
test_iterative()[source]

Ensure unicode reader consumes the data iteratively.

test_unicoded()[source]

Ensure utf-8 strings in the data are converted to unicode sequences.

class karld.tests.test_unicode_io.TestUnicodeCSVRowWriter(methodName='runTest')[source]

Bases: unittest.case.TestCase

Ensure get_csv_row_writer returns a function that will write a row of data to a stream.

setUp()[source]
test_write_unicode()[source]

Ensure the function returned from get_csv_row_writer will write a row to the io stream.

class karld.tests.test_unicode_io.TestUnicodeToUnicodeCSVReader(methodName='runTest')[source]

Bases: unittest.case.TestCase

Ensure the unicode csv reader is iterative, and consumes an iterator of unicode strings that are delimited and split them into sequences of unicode strings.

test_iterative()[source]

Ensure csv_unicode_reader consumes iteratively.

test_unicode_to_csv_unicode()[source]

Ensure that a stream of unicode strings are converted to sequences by parsing with the csv module.