/
kinetics_test.py
32 lines (24 loc) · 1.05 KB
/
kinetics_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pytest
from pandas import DatetimeTZDtype
from transcriptic.sampledata.connection import MockConnection
from transcriptic.analysis.kinetics import *
from transcriptic.sampledata.dataset import load_sample_kinetics_datasets
class TestKinetics:
@pytest.fixture(scope="class", autouse=True)
def init_mock_connection(self):
yield MockConnection()
def test_spectrophotometry_object(self):
sample_datasets = load_sample_kinetics_datasets()
spectrophotometry_obj = Spectrophotometry(sample_datasets)
assert spectrophotometry_obj.operation == "absorbance"
readings = spectrophotometry_obj.readings
assert isinstance(readings.columns.dtype, DatetimeTZDtype)
# there isn't a good way to test this currently, let's ensure the calls work
spectrophotometry_obj.plot()
spectrophotometry_obj.plot(
wells=["A1", "A2", "B1", "B2", "C1", "C2"],
groupby="row",
title="Test title",
xlabel="test xlabel",
ylabel="test ylabel",
)