Skip to content

Commit

Permalink
unit test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmaxson committed Mar 10, 2020
1 parent af7ef70 commit 901d864
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/processing/test_pipeline.py
Expand Up @@ -61,14 +61,15 @@ def test_run_pipeline_demo_containers():
@staticmethod
def test_run_pipeline_with_create_sample_sheet():
test_data_dir = 'docs/example_data/epic_plus'
testargs = ["__program__", '-d', test_data_dir, '--no_export', '--sample_name', 'Sample_1', '--no_sample_sheet']
with patch.object(sys, 'argv', testargs):
test_data_containers = pipeline.run_pipeline(test_data_dir)
# spot checking the output.
if not test_data_containers[1].unmethylated.data_frame.iloc[0]['mean_value'] == 2712:
raise AssertionError()
if not np.isclose(test_data_containers[1].unmethylated.data_frame.iloc[0]['noob'], 4479.96501260212):
raise AssertionError()
#testargs = ["__program__", '-d', test_data_dir, '--no_export', '--sample_name', 'Sample_1', '--no_sample_sheet']
#with patch.object(sys, 'argv', testargs):
test_data_containers = pipeline.run_pipeline(test_data_dir, export=False, sample_name=['Sample_1'],
meta_data_frame=False, make_sample_sheet=True)
# spot checking the output.
if not np.isclose(test_data_containers[0]._SampleDataContainer__data_frame.iloc[0]['noob_meth'], 1180.23):
raise AssertionError()
if not np.isclose(test_data_containers[0]._SampleDataContainer__data_frame.iloc[0]['beta_value'], 0.75902253):
raise AssertionError()

@staticmethod
def test_download_manifest_dummy_file():
Expand Down

0 comments on commit 901d864

Please sign in to comment.