We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0929928 commit a18f499Copy full SHA for a18f499
1 file changed
tests/test_view_modes.py
@@ -0,0 +1,18 @@
1
+"""Editor view-mode state machine cycling and visibility."""
2
+import view_modes
3
+
4
5
+def test_cycle_order():
6
+ assert view_modes.next_mode(view_modes.EDIT) == view_modes.SPLIT
7
+ assert view_modes.next_mode(view_modes.SPLIT) == view_modes.PREVIEW
8
+ assert view_modes.next_mode(view_modes.PREVIEW) == view_modes.EDIT
9
10
11
+def test_cycle_unknown_resets_to_edit():
12
+ assert view_modes.next_mode("bogus") == view_modes.EDIT
13
14
15
+def test_visibility():
16
+ assert view_modes.visibility(view_modes.EDIT) == (True, False)
17
+ assert view_modes.visibility(view_modes.SPLIT) == (True, True)
18
+ assert view_modes.visibility(view_modes.PREVIEW) == (False, True)
0 commit comments