Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 59b5550

Browse filesBrowse files
committed
black
1 parent f01811a commit 59b5550
Copy full SHA for 59b5550

File tree

Expand file treeCollapse file tree

1 file changed

+19
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-12
lines changed

‎tests/test_positions_graphics.py

Copy file name to clipboardExpand all lines: tests/test_positions_graphics.py
+19-12Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,8 @@ def test_change_thickness():
7777

7878
@pytest.mark.parametrize("graphic_type", ["line", "scatter"])
7979
@pytest.mark.parametrize("colors", [None, *generate_color_inputs("b")])
80-
@pytest.mark.parametrize(
81-
"uniform_color", [True, False]
82-
)
83-
@pytest.mark.parametrize(
84-
"alpha", [1.0, 0.5, 0.0]
85-
)
80+
@pytest.mark.parametrize("uniform_color", [True, False])
81+
@pytest.mark.parametrize("alpha", [1.0, 0.5, 0.0])
8682
def test_uniform_color(graphic_type, colors, uniform_color, alpha):
8783
fig = fpl.Figure()
8884

@@ -110,20 +106,29 @@ def test_uniform_color(graphic_type, colors, uniform_color, alpha):
110106
assert graphic.colors == pygfx.Color([0, 0, 1, alpha])
111107

112108
# check pygfx material
113-
npt.assert_almost_equal(graphic.world_object.material.color, np.asarray(graphic.colors))
109+
npt.assert_almost_equal(
110+
graphic.world_object.material.color, np.asarray(graphic.colors)
111+
)
114112
else:
115113
assert isinstance(graphic._colors, VertexColors)
116114
assert isinstance(graphic.colors, VertexColors)
117115
if colors is None:
118116
# default white
119-
npt.assert_almost_equal(graphic.colors.value,
120-
np.repeat([[1, 1, 1, alpha]], repeats=len(graphic.data), axis=0))
117+
npt.assert_almost_equal(
118+
graphic.colors.value,
119+
np.repeat([[1, 1, 1, alpha]], repeats=len(graphic.data), axis=0),
120+
)
121121
else:
122122
# blue
123-
npt.assert_almost_equal(graphic.colors.value, np.repeat([[0, 0, 1, alpha]], repeats=len(graphic.data), axis=0))
123+
npt.assert_almost_equal(
124+
graphic.colors.value,
125+
np.repeat([[0, 0, 1, alpha]], repeats=len(graphic.data), axis=0),
126+
)
124127

125128
# check geometry
126-
npt.assert_almost_equal(graphic.world_object.geometry.colors.data, graphic.colors.value)
129+
npt.assert_almost_equal(
130+
graphic.world_object.geometry.colors.data, graphic.colors.value
131+
)
127132

128133

129134
def test_uniform_size():
@@ -272,7 +277,9 @@ def test_cmap(
272277

273278
@pytest.mark.parametrize("graphic_type", ["line", "scatter"])
274279
@pytest.mark.parametrize("cmap", ["jet"])
275-
@pytest.mark.parametrize("colors", [None, *generate_color_inputs("multi")]) # cmap arg overrides colors
280+
@pytest.mark.parametrize(
281+
"colors", [None, *generate_color_inputs("multi")]
282+
) # cmap arg overrides colors
276283
@pytest.mark.parametrize(
277284
"uniform_color", [True] # none of these will work with a uniform buffer
278285
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.