Skip to content

Commit 943cdd3

Browse files
committed
updated readme
1 parent c401eda commit 943cdd3

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
1-
# Architecture decision record
2-
3-
Select a test framework for Codeflare pipeline.
1+
# Codeflare pipeline tests
42

53
Contents:
64

7-
* [Use pytest as test framework](#use-pytest-as-test-framework)
5+
* [Unit test execution](#unit-test-execution)
86
* [Unit test coverage](#unit-test-coverage)
7+
* [Use pytest as test framework](#use-pytest-as-test-framework)
98

10-
## Use pytest as test framework
11-
PyTest is a testing framework in Python, with simple and easy syntax targeting unit tests and simple functional tests. PyTest can run tests in parallel and automatically detects tests in the test folder. PyTest serves the current goal of testing Codeflare pipelines well.
9+
## Unit test execution
10+
Run pytest to execute all test code in the folder
11+
```
12+
pytest
13+
```
1214

1315
## Unit test coverage
1416
* and (fan-in) node in a pipeline graph, and variants
1517
* or (fan-out) node in a pipeline graph, and variants
1618
* multibranch with mixtures of and/or nodes in a pipeline graph
19+
20+
## Use pytest as test framework
21+
PyTest is a testing framework in Python, with simple and easy syntax targeting unit tests and simple functional tests. PyTest can run tests in parallel and automatically detects tests in the test folder. PyTest serves the current goal of testing Codeflare pipelines well.

codeflare/pipelines/tests/test_and.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def transform(self, xy_list):
2020
for xy in xy_list:
2121
X_list.append(xy.get_x())
2222
y_vec = xy.get_y()
23-
X_concat = np.concatenate(X_list, axis=0)
23+
X_concat = np.concatenate(X_list, axis=1)
2424

2525
return Xy(X_concat, y_vec)
2626

@@ -67,8 +67,8 @@ def test_two_tier_and():
6767
Xout = ray.get(node_g_output[0].get_Xref())
6868
yout = ray.get(node_g_output[0].get_yref())
6969

70-
assert Xout.shape == (40000, 4)
71-
assert yout.shape == (10000, 1)
70+
assert Xout.shape[0] == 10000
71+
assert yout.shape[0] == 10000
7272

7373
ray.shutdown()
7474

@@ -111,8 +111,8 @@ def test_four_input_and():
111111
Xout = ray.get(node_e_output[0].get_Xref())
112112
yout = ray.get(node_e_output[0].get_yref())
113113

114-
assert Xout.shape == (40000, 4)
115-
assert yout.shape == (10000, 1)
114+
assert Xout.shape[0] == 10000
115+
assert yout.shape[0] == 10000
116116

117117
ray.shutdown()
118118

@@ -148,8 +148,8 @@ def test_two_input_and():
148148
Xout = ray.get(node_c_output[0].get_Xref())
149149
yout = ray.get(node_c_output[0].get_yref())
150150

151-
assert Xout.shape == (20000, 4)
152-
assert yout.shape == (10000, 1)
151+
assert Xout.shape[0] == 10000
152+
assert yout.shape[0] == 10000
153153

154154
ray.shutdown()
155155

0 commit comments

Comments
 (0)