Skip to content

Commit 78202d4

Browse files
committed
Factored constants out of tests, changed test imports from local to absolute.
1 parent be7ef72 commit 78202d4

18 files changed

+1069
-989
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# User-specific stuff:
22
.idea
3+
.vscode
34
scratch/
45
scratch_data/
56
*.png

tests/__init__.py

+18-18
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
"""
44
import unittest
55

6-
from .sample_tests import SampleTestCase
7-
from .sample_export_tests import SampleExportTestCase
8-
from .gatingml_tests import GatingMLTestCase
9-
from .gating_strategy_prog_gate_tests import GatingTestCase
10-
from .export_gml_tests import ExportGMLTestCase
11-
from .gating_strategy_tests import GatingStrategyTestCase
12-
from .gating_strategy_reused_gates_tests import GatingStrategyReusedGatesTestCase
13-
from .gating_strategy_remove_gates_tests import GatingStrategyRemoveGatesTestCase
14-
from .gating_strategy_custom_gates_tests import GatingStrategyCustomGatesTestCase
15-
from .session_tests import SessionTestCase
16-
from .session_export_tests import SessionExportTestCase
17-
from .workspace_tests import WorkspaceTestCase
18-
from .gating_results_tests import GatingResultsTestCase
19-
from .matrix_tests import MatrixTestCase
20-
from .transform_tests import TransformsTestCase
21-
from .gate_tests import GateTestCase
22-
from .string_repr_tests import StringReprTestCase
23-
from .plot_tests import PlotTestCase
6+
from tests.sample_tests import SampleTestCase
7+
from tests.sample_export_tests import SampleExportTestCase
8+
from tests.gatingml_tests import GatingMLTestCase
9+
from tests.gating_strategy_prog_gate_tests import GatingTestCase
10+
from tests.export_gml_tests import ExportGMLTestCase
11+
from tests.gating_strategy_tests import GatingStrategyTestCase
12+
from tests.gating_strategy_reused_gates_tests import GatingStrategyReusedGatesTestCase
13+
from tests.gating_strategy_remove_gates_tests import GatingStrategyRemoveGatesTestCase
14+
from tests.gating_strategy_custom_gates_tests import GatingStrategyCustomGatesTestCase
15+
from tests.session_tests import SessionTestCase
16+
from tests.session_export_tests import SessionExportTestCase
17+
from tests.workspace_tests import WorkspaceTestCase
18+
from tests.gating_results_tests import GatingResultsTestCase
19+
from tests.matrix_tests import MatrixTestCase
20+
from tests.transform_tests import TransformsTestCase
21+
from tests.gate_tests import GateTestCase
22+
from tests.string_repr_tests import StringReprTestCase
23+
from tests.plot_tests import PlotTestCase
2424

2525
if __name__ == "__main__":
2626
unittest.main()

tests/export_gml_tests.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
import pandas as pd
1010

1111
from flowkit import Sample, Session
12-
13-
data1_fcs_path = 'data/gate_ref/data1.fcs'
14-
data1_sample = Sample(data1_fcs_path)
12+
from tests.test_config import data1_sample
1513

1614

1715
class ExportGMLTestCase(unittest.TestCase):

tests/gate_tests.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
"""
22
Unit tests for base Gate class methods
33
"""
4+
45
import unittest
56
import numpy as np
67

78
from flowkit import Dimension
8-
from .gating_strategy_tests import poly1_gate
9-
10-
test_data_range1 = np.linspace(0.0, 10.0, 101)
9+
from tests.test_config import poly1_gate
1110

1211

1312
class GateTestCase(unittest.TestCase):
1413
"""Tests Gate objects"""
14+
1515
def test_get_gate_dimension(self):
16-
dim = poly1_gate.get_dimension('FL2-H')
16+
dim = poly1_gate.get_dimension("FL2-H")
1717

1818
self.assertIsInstance(dim, Dimension)
1919

2020
def test_get_gate_dimension_ids(self):
2121
dim_ids = poly1_gate.get_dimension_ids()
2222

23-
self.assertListEqual(dim_ids, ['FL2-H', 'FL3-H'])
23+
self.assertListEqual(dim_ids, ["FL2-H", "FL3-H"])

tests/gating_results_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import copy
55
import unittest
66
from flowkit import Workspace
7-
from .session_tests import test_samples_8c_full_set
7+
from tests.test_config import test_samples_8c_full_set
88

99
wsp_path = "data/8_color_data_set/reused_quad_gate_with_child.wsp"
1010
group_name = 'All Samples'

0 commit comments

Comments
 (0)