Commit d1c63b32 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Add forgotten unit tests folder

parent 043c2e0e
# -*- coding: utf-8 -*-
"""Unit tests to support the encoding / decoding of the identifiers
from the various databases managed.
"""
from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
import pytest
@pytest.fixture()
def feed_output():
return ['A\tB\n'], \
['A B\n', '% h2\n', '% h3\n', '% h0 h1\n', '%\n'], \
['5\n']
def test_output(feed_output):
"""Output must be:
camp:
A B
cam complete:
A B
% h2
% h3
% h0 h1
%
cam step:
5
"""
with open("result/mini_test_publi_P_cam.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[0]
with open("result/mini_test_publi_P_cam_complete.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[1]
with open("result/mini_test_publi_P_cam_step.txt", 'r') as file:
found = [line for line in file]
assert found == feed_output[2]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment