File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
44
55[project ]
66name = " ansys-tools-visualization-interface"
7- version = " 0.5 .dev0"
7+ version = " 0.7 .dev0"
88description = " A Python visualization interface for PyAnsys libraries"
99readme = " README.rst"
1010requires-python = " >=3.10,<4"
Original file line number Diff line number Diff line change @@ -148,3 +148,33 @@ def test_screenshot(tmp_path):
148148 pl .plot (sphere )
149149 pl .show (screenshot = tmp_path / "screenshot.png" )
150150 assert Path (tmp_path / "screenshot.png" ).is_file ()
151+
152+
153+ def test_dark_mode ():
154+ """Test dark mode different functionalities."""
155+ # Test auto dark mode
156+ sphere = pv .Sphere ()
157+ pl = Plotter ()
158+ pl .backend .scene .background_color = [10 , 10 , 10 ]
159+ pl .plot (sphere )
160+ pl .show ()
161+
162+ # Test auto dark mode below threshold
163+ sphere = pv .Sphere ()
164+ pl = Plotter ()
165+ pl .backend .scene .background_color = [10 , 10 , 10 ]
166+ pl .plot (sphere )
167+ pl .show ()
168+
169+ # Test auto dark mode above threshold
170+ sphere = pv .Sphere ()
171+ pl = Plotter ()
172+ pl .backend .scene .background_color = [0 , 121 , 255 ]
173+ pl .plot (sphere )
174+ pl .show ()
175+
176+ # Test manual dark mode
177+ sphere = pv .Sphere ()
178+ pl = Plotter ()
179+ pl .plot (sphere )
180+ pl .show (dark_mode = True )
You can’t perform that action at this time.
0 commit comments