Skip to content

Commit

Permalink
fix genericjob test
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 7, 2024
1 parent e6691f6 commit 2ff2c78
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/job/test_genericJob.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,11 +580,6 @@ def test_tail(self):

for i in range(len(content)):
with self.subTest(i=i):
with contextlib.redirect_stdout(io.StringIO(newline=os.linesep)) as f:
job.tail("test_file", lines=i+1)
reference_str = os.linesep.join(content[-i-1:]) + os.linesep
self.assertEqual(f.getvalue().replace('\r', ''), reference_str.replace('\r', ''),
"tail read incorrect lines from output file when job uncompressed!")
with contextlib.redirect_stdout(io.StringIO(newline=os.linesep)) as f:
job.files.tail("test_file", lines=i+1)
reference_str = os.linesep.join(content[-i-1:]) + os.linesep
Expand All @@ -598,11 +593,6 @@ def test_tail(self):

job.compress()
for i in range(len(content)):
with contextlib.redirect_stdout(io.StringIO()) as f:
job.tail("test_file", lines=i+1)
reference_str = os.linesep.join(content[-i-1:]) + os.linesep
self.assertEqual(f.getvalue().replace('\r', ''), reference_str.replace('\r', ''),
"tail read incorrect lines from output file when job compressed!")
with contextlib.redirect_stdout(io.StringIO()) as f:
job.files.tail("test_file", lines=i+1)
reference_str = os.linesep.join(content[-i-1:]) + os.linesep
Expand Down

0 comments on commit 2ff2c78

Please sign in to comment.