Skip to content

Commit

Permalink
[add] some new code paths to cover in the test
Browse files Browse the repository at this point in the history
  • Loading branch information
dvolgyes committed Apr 20, 2017
1 parent 5471727 commit 9d93972
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ for i in `seq 120`; do
xdotool key F8
xdotool key F9
xdotool key F10
xdotool key F11
xdotool type a
xdotool type b
xdotool type c
Expand Down
5 changes: 2 additions & 3 deletions perceptionmd/perception.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def key_match(scancode, modifiers, hotkey):
Window.size = (int(self.settings['window_width']), int(self.settings['window_height']))
else:
Window.size = self.winsize
Window.fullscreen ^= True
if not self.automated_test:
Window.fullscreen ^= True
self.viewport.fit_to_window()
for s in self.screens:
s.canvas.ask_update()
Expand Down Expand Up @@ -186,8 +187,6 @@ def build(self):
else:
if os.path.exists(src):
screen.document.source = src
else:
screen.document.text = "File not found: %s " % src

screen = End.End(name="automatic exit point")
self.sm.add_widget(screen)
Expand Down
2 changes: 1 addition & 1 deletion perceptionmd/utils/rev_eng.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def getOffset(array, minium_data=3):
if len(data.shape) == 2 and threeD:
try:
return data.reshape(-1, data.shape[1], data.shape[1])
except:
except: # pragma: no cover
return data.reshape(1, data.shape[0], data.shape[1])
return data

Expand Down
2 changes: 0 additions & 2 deletions perceptionmd/widgets/Choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ def on_pre_leave(self, *args, **kwargs):
self.log(' {:<10} = {}' .format("selection", self.choice))
self.log(' {:<10} = "{}"' .format(
"label", self.text))
else:
assert(False) # pragma: no cover
self.log("")

def move_on(self, *args, **kwargs):
Expand Down

0 comments on commit 9d93972

Please sign in to comment.