berhoel.ctitools.tests namespace

Submodules

berhoel.ctitools.tests.test_ct module

Tests for processing c’t entries.

berhoel.ctitools.tests.test_ct.issue_map() IssueMap[source]

Return map from issue to corresponding data.

Returns:

map

berhoel.ctitools.tests.test_ct.test_ct_dategen(issue: tuple, date: datetime, issue_map: IssueMap) None[source]

Check for correct mappiong from issue to issue data.

Parameters:

issue

berhoel.ctitools.tests.test_ctitools module

Tests for ctitools.

berhoel.ctitools.tests.test_processing module

Test article entry processing.

berhoel.ctitools.tests.test_processing.cti_entry_data_1() bytes[source]

Return content for sample CTI file.

Returns:

sample data

berhoel.ctitools.tests.test_processing.cti_entry_1(tmp_path: Path, cti_entry_data_1: Buffer) Path[source]

Return path to sample CTI file.

Parameters:
  • tmp_path – directory for temporary files

  • cti_entry_data_1 – content for sample file

Returns:

path to sample CTI file

berhoel.ctitools.tests.test_processing.cti_entry_zip_1(tmp_path: Path, cti_entry_data_1: str) Path[source]

Return path to zipped sample CTI file.

Parameters:
  • tmp_path – directory for temporary files

  • cti_entry_data_1 – content for sample file

Returns:

path to sample CTI file

berhoel.ctitools.tests.test_processing.cti_entry_data_2() bytes[source]

Return test entry.

berhoel.ctitools.tests.test_processing.cti_entry(request: SubRequest) str[source]

Return filename for test file.

Parameters:

request – testfile request

Returns:

file name

berhoel.ctitools.tests.test_processing.cti_entry_2(tmp_path: Path, cti_entry_data_2: Buffer) Path[source]

Provide sample data file.

Parameters:
  • tmp_path – temporary path for storing files

  • cti_entry_data_2 – content for sample file

Returns:

path to sample file

berhoel.ctitools.tests.test_processing.cti_entry_zip_2(tmp_path: Path, cti_entry_data_2: str) Path[source]

Provide zipped sample CTI files.

Parameters:
  • tmp_path – temporary path for storing files

  • cti_entry_data_2 – content for sample file

Returns:

path to zipped data file

berhoel.ctitools.tests.test_processing.cti_entry_data_3() bytes[source]

Provide sampe cti entries.

Returns:

sample data

berhoel.ctitools.tests.test_processing.cti_entry_3(tmp_path: Path, cti_entry_data_3: Buffer) Path[source]

Provide cti entries.

Parameters:
  • tmp_path – temporary path for storing files

  • cti_entry_data_3 – content for sample file

Returns:

path to sample file

berhoel.ctitools.tests.test_processing.test_process_author_1(cti_entry: str) None[source]

Another test fopr input encoding handling.

Parameters:

cti_etnry – sampel entry

Raises:

AssertionError

berhoel.ctitools.tests.test_processing.test_ctientry_1() None[source]

Check comparison operator for class CTIEntry.

berhoel.ctitools.tests.test_processing.test_ctientry_2() None[source]

Check comparison operator for class CTIEntry.

berhoel.ctitools.tests.test_processing.test_process_author_2(cti_entry: str) None[source]

Another test for processing autor entries.

Cti_entry:

input data

Raises:

AssertionError

berhoel.ctitools.tests.test_processing.test_process_chars_2(cti_entry: str) None[source]

Testing handling of character encoding.

Parameters:

cti_entry – test string

Raises:

AssertionError

berhoel.ctitools.tests.test_processing.test_process_authors_ix_3(cti_entry_3: Path) None[source]

Testing autor entries for iX.

Parameters:

cti_entry_3 – Path to test file.

berhoel.ctitools.tests.test_processing.cti_entry_data_4()[source]
berhoel.ctitools.tests.test_processing.cti_entry_4(tmp_path: Path, cti_entry_data_4: Buffer) Path[source]

Return path to sample CTI file.

Parameters:
  • tmp_path – directory for temporary files

  • cti_entry_data_4 – content for sample file

Returns:

path to sample CTI file

berhoel.ctitools.tests.test_processing.cti_4(cti_entry_4: Path) CTIEntry[source]
berhoel.ctitools.tests.test_processing.test_ctientry_4(cti_4: CTIEntry) None[source]

Check comparison operator for class CTIEntry.