Commit 9b745dd2 authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add in tests.

parent d99b54f6
Pipeline #5266 failed with stage
in 1 second
#!/usr/bin/env python3
import pytest
import os
import pandas as pd
from StringIO import StringIO
import transform_imaging
IMAGE_STRING = """MRN,CPT,TYPE,C_NAME,START_DATE,OBSERVATION_BLOB
45,CPT:74160,CT,"(CPT:74160)Computed tomography, abdomen; with contrast material(s)",9/20/17 0:00,"AVM_VISIT_NUMBER:13348936;ICD9CODE:789.5; IDX PROCEDURE_NAME:CT, ABD, W/CONTRAST"
"""
@pytest.fixture
def image():
image_file = StringIO(IMAGE_STRING)
image_df = pd.read_csv(image_file)
return image_df
@pytest.mark.unit
def test_check_reformmat(image):
transform_immage = transform_imaging.reformat_record(image)
assert transform_immage.shape[1] == 4
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