Skip to content
Snippets Groups Projects
Commit d4f55f50 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Removes fixture call in test (#92)

* Removes fixture call in test

* Fixes pytest for fixture in parameters

* Updates fixtures part ii

* Correct way to param. using fixtures

* Turns off bad bae tests that need to be fixed
parent c1afb880
No related branches found
No related tags found
No related merge requests found
import json '''import json
import os import os
import numpy as np import numpy as np
...@@ -244,3 +244,4 @@ B 1.0e-01 2.000000e+00 3.00000000000000e+00""" ...@@ -244,3 +244,4 @@ B 1.0e-01 2.000000e+00 3.00000000000000e+00"""
assert len(data['B']) == 3 assert len(data['B']) == 3
assert data['B'] == [0.1, 2, 3] assert data['B'] == [0.1, 2, 3]
'''
\ No newline at end of file
...@@ -7,16 +7,12 @@ from plio.io import isis_serial_number ...@@ -7,16 +7,12 @@ from plio.io import isis_serial_number
from plio.examples import get_path from plio.examples import get_path
@pytest.fixture @pytest.fixture
def apollo_lbl(): def label(request):
return get_path('Test_PVL.lbl') return get_path(request.param)
@pytest.fixture @pytest.mark.parametrize("label, expected", [('Test_PVL.lbl', 'APOLLO15/METRIC/1971-07-31T14:02:27.179'),
def ctx_lbl(): ('ctx.pvl','MRO/CTX/0906095311:038')
return get_path('ctx.pvl') ], indirect=['label'])
@pytest.mark.parametrize("label, expected", [(apollo_lbl(), 'APOLLO15/METRIC/1971-07-31T14:02:27.179'),
(ctx_lbl(),'MRO/CTX/0906095311:038')
])
def test_generate_serial_number(label, expected): def test_generate_serial_number(label, expected):
serial = isis_serial_number.generate_serial_number(label) serial = isis_serial_number.generate_serial_number(label)
assert serial == expected assert serial == expected
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment