From 79e99efc69bb71f1383e1b079a1f045e2a3c288e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Iranzo-S=C3=A1nchez?= Date: Mon, 15 Jan 2024 13:58:45 +0100 Subject: [PATCH] Fix jobs and add tests (#467) --- tests/job_tests/text/__init__.py | 0 tests/job_tests/text/files/input_file.txt | 4 ++ tests/job_tests/text/files/out.head.1.txt | 1 + tests/job_tests/text/files/out.head.2.txt | 2 + tests/job_tests/text/files/out.head.2.txt.gz | Bin 0 -> 70 bytes tests/job_tests/text/files/out.tail.2.txt | 2 + tests/job_tests/text/files/out.tail.2.txt.gz | Bin 0 -> 37 bytes tests/job_tests/text/files/out.tail.3.txt | 3 + tests/job_tests/text/test_processing.py | 57 +++++++++++++++++++ text/processing.py | 16 ++++-- 10 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 tests/job_tests/text/__init__.py create mode 100644 tests/job_tests/text/files/input_file.txt create mode 100644 tests/job_tests/text/files/out.head.1.txt create mode 100644 tests/job_tests/text/files/out.head.2.txt create mode 100644 tests/job_tests/text/files/out.head.2.txt.gz create mode 100644 tests/job_tests/text/files/out.tail.2.txt create mode 100644 tests/job_tests/text/files/out.tail.2.txt.gz create mode 100644 tests/job_tests/text/files/out.tail.3.txt create mode 100644 tests/job_tests/text/test_processing.py diff --git a/tests/job_tests/text/__init__.py b/tests/job_tests/text/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/job_tests/text/files/input_file.txt b/tests/job_tests/text/files/input_file.txt new file mode 100644 index 00000000..8449831a --- /dev/null +++ b/tests/job_tests/text/files/input_file.txt @@ -0,0 +1,4 @@ +This is an input file for testing. Sentence 1. +Sentence 2. +Sentence 3. +Sentence 4. diff --git a/tests/job_tests/text/files/out.head.1.txt b/tests/job_tests/text/files/out.head.1.txt new file mode 100644 index 00000000..36d0307a --- /dev/null +++ b/tests/job_tests/text/files/out.head.1.txt @@ -0,0 +1 @@ +This is an input file for testing. Sentence 1. diff --git a/tests/job_tests/text/files/out.head.2.txt b/tests/job_tests/text/files/out.head.2.txt new file mode 100644 index 00000000..2a289dad --- /dev/null +++ b/tests/job_tests/text/files/out.head.2.txt @@ -0,0 +1,2 @@ +This is an input file for testing. Sentence 1. +Sentence 2. diff --git a/tests/job_tests/text/files/out.head.2.txt.gz b/tests/job_tests/text/files/out.head.2.txt.gz new file mode 100644 index 0000000000000000000000000000000000000000..9f84cdc579e5be40b6a442828bac09bfa70c65eb GIT binary patch literal 70 zcmb2|=3oE=X6} {out}") + self.sh(pipeline) + self.length.set(self.num_lines) class SetDifferenceJob(Job):