Tests🔗
berhoel.ctitools.tests.test_processing 🔗
Test article entry processing.
Functions:
-
cti_entry–Return filename for test file.
-
cti_entry_1–Return path to sample CTI file.
-
cti_entry_2–Provide sample data file.
-
cti_entry_3–Provide cti entries.
-
cti_entry_4–Return path to sample CTI file.
-
cti_entry_data_1–Return content for sample CTI file.
-
cti_entry_data_2–Return test entry.
-
cti_entry_data_3–Provide sampe cti entries.
-
cti_entry_zip_1–Return path to zipped sample CTI file.
-
cti_entry_zip_2–Provide zipped sample CTI files.
-
test_ctientry_1–Check comparison operator for class
CTIEntry. -
test_ctientry_2–Check comparison operator for class
CTIEntry. -
test_ctientry_4–Check comparison operator for class
CTIEntry. -
test_process_author_1–Another test fopr input encoding handling.
-
test_process_author_2–Another test for processing autor entries.
-
test_process_authors_ix_3–Testing autor entries for iX.
-
test_process_chars_2–Testing handling of character encoding.
Classes🔗
Functions🔗
berhoel.ctitools.tests.test_processing.cti_entry 🔗
berhoel.ctitools.tests.test_processing.cti_entry_1 🔗
cti_entry_1(tmp_path: Path, cti_entry_data_1: Buffer) -> Path
Return path to sample CTI file.
Parameters:
-
(tmp_path🔗Path) –directory for temporary files
-
(cti_entry_data_1🔗Buffer) –content for sample file
Returns:
-
Path–path to sample CTI file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_2 🔗
cti_entry_2(tmp_path: Path, cti_entry_data_2: Buffer) -> Path
Provide sample data file.
Parameters:
-
(tmp_path🔗Path) –temporary path for storing files
-
(cti_entry_data_2🔗Buffer) –content for sample file
Returns:
-
Path–path to sample file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_3 🔗
cti_entry_3(tmp_path: Path, cti_entry_data_3: Buffer) -> Path
Provide cti entries.
Parameters:
-
(tmp_path🔗Path) –temporary path for storing files
-
(cti_entry_data_3🔗Buffer) –content for sample file
Returns:
-
Path–path to sample file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_4 🔗
cti_entry_4(tmp_path: Path, cti_entry_data_4: Buffer) -> Path
Return path to sample CTI file.
Parameters:
-
(tmp_path🔗Path) –directory for temporary files
-
(cti_entry_data_4🔗Buffer) –content for sample file
Returns:
-
Path–path to sample CTI file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_data_1 🔗
cti_entry_data_1() -> bytes
Return content for sample CTI file.
Returns:
-
bytes–sample data
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_data_2 🔗
cti_entry_data_2() -> bytes
Return test entry.
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_data_3 🔗
cti_entry_data_3() -> bytes
Provide sampe cti entries.
Returns:
-
bytes–sample data
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_zip_1 🔗
cti_entry_zip_1(tmp_path: Path, cti_entry_data_1: str) -> Path
Return path to zipped sample CTI file.
Parameters:
-
(tmp_path🔗Path) –directory for temporary files
-
(cti_entry_data_1🔗str) –content for sample file
Returns:
-
Path–path to sample CTI file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.cti_entry_zip_2 🔗
cti_entry_zip_2(tmp_path: Path, cti_entry_data_2: str) -> Path
Provide zipped sample CTI files.
Parameters:
-
(tmp_path🔗Path) –temporary path for storing files
-
(cti_entry_data_2🔗str) –content for sample file
Returns:
-
Path–path to zipped data file
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_ctientry_1 🔗
Check comparison operator for class CTIEntry.
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_ctientry_2 🔗
Check comparison operator for class CTIEntry.
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_ctientry_4 🔗
test_ctientry_4(cti_4: CTIEntry) -> None
Check comparison operator for class CTIEntry.
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_process_author_1 🔗
Another test fopr input encoding handling.
Parameters:
Raises:
-
AssertionError–if test fails
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_process_author_2 🔗
Another test for processing autor entries.
Parameters:
Raises:
-
AssertionError–if test fails
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_process_authors_ix_3 🔗
test_process_authors_ix_3(cti_entry_3: Path) -> None
Testing autor entries for iX.
Parameters:
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_processing.test_process_chars_2 🔗
Testing handling of character encoding.
Parameters:
Raises:
-
AssertionError–if test fails
Source code in src/berhoel/ctitools/tests/test_processing.py
berhoel.ctitools.tests.test_ct 🔗
Tests for processing c’t entries.
Functions:
-
issue_map–Return map from issue to corresponding data.
-
test_ct_dategen–Check for correct mapping from issue to issue data.
Functions🔗
berhoel.ctitools.tests.test_ct.test_ct_dategen 🔗
Check for correct mapping from issue to issue data.
Parameters:
Source code in src/berhoel/ctitools/tests/test_ct.py
berhoel.ctitools.cti2bibtex.tests.test_base 🔗
Basic tests for generating BibTex entries from c’t and iX articles.
Functions:
-
test_with_shorttitle–Test correct generation of BiBTeX file entry.
-
test_without_shorttitle–Test correct generation of BiBTeX file entry.
Classes🔗
Functions🔗
berhoel.ctitools.cti2bibtex.tests.test_base.test_with_shorttitle 🔗
Test correct generation of BiBTeX file entry.
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_base.py
berhoel.ctitools.cti2bibtex.tests.test_base.test_without_shorttitle 🔗
Test correct generation of BiBTeX file entry.
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_base.py
berhoel.ctitools.cti2bibtex.tests.test_generate 🔗
Check generation of BibTex output.
Functions:
-
bibtex_entry_1–Provide test item for
BibTeXEntry. -
bibtex_entry_2–Provide test item for
BibTeXEntry. -
cti_entry_1–Provide test item for
CTIEntry. -
cti_entry_2–Provide test item for
CTIEntry. -
test_autor_enty_1–Test correct generation of BiBTeX file entry.
-
test_autor_enty_2–Test correct generation of BiBTeX file entry.
Classes🔗
Functions🔗
berhoel.ctitools.cti2bibtex.tests.test_generate.bibtex_entry_1 🔗
bibtex_entry_1(cti_entry_1: CTIEntry) -> BiBTeXEntry
Provide test item for BibTeXEntry.
Parameters:
Returns:
-
BiBTeXEntry–Sample entry
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_generate.py
berhoel.ctitools.cti2bibtex.tests.test_generate.bibtex_entry_2 🔗
bibtex_entry_2(cti_entry_2: CTIEntry) -> BiBTeXEntry
Provide test item for BibTeXEntry.
Parameters:
Returns:
-
BiBTeXEntry–Sample entry
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_generate.py
berhoel.ctitools.cti2bibtex.tests.test_generate.cti_entry_1 🔗
cti_entry_1() -> CTIEntry
Provide test item for CTIEntry.
Returna
Sample entry
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_generate.py
berhoel.ctitools.cti2bibtex.tests.test_generate.cti_entry_2 🔗
cti_entry_2() -> CTIEntry
Provide test item for CTIEntry.
Returns:
-
CTIEntry–Sample entry
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_generate.py
berhoel.ctitools.cti2bibtex.tests.test_generate.test_autor_enty_1 🔗
test_autor_enty_1(bibtex_entry_1: BiBTeXEntry) -> None
Test correct generation of BiBTeX file entry.
Parameters:
-
(bibtex_entry_1🔗BiBTeXEntry) –element to check
Source code in src/berhoel/ctitools/cti2bibtex/tests/test_generate.py
berhoel.ctitools.cti2bibtex.tests.test_generate.test_autor_enty_2 🔗
test_autor_enty_2(bibtex_entry_2: BiBTeXEntry) -> None
Test correct generation of BiBTeX file entry.
Parameters:
-
(bibtex_entry_2🔗BiBTeXEntry) –element to check