Skip to content

Commit

Permalink
Add support for commands when prompt is not set (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-usielski authored Jul 26, 2022
1 parent e1c216e commit c8fbe91
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## moler 2.3.1

### Improved

* Add support for commands when prompt is not set

## moler 2.3.0

### Improved
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
author = 'Nokia'

# The short X.Y version
version = '2.3.0'
version = '2.3.1'
# The full version, including alpha/beta/rc tags
release = 'stable'

Expand Down
4 changes: 3 additions & 1 deletion moler/cmd/commandtextualgeneric.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ def _break_exec_on_regex(self, line, is_full_line):

def __str__(self):
base_str = super(CommandTextualGeneric, self).__str__()
expected_prompt = self._re_prompt.pattern
expected_prompt = "[NOT_SET]"
if self._re_prompt:
expected_prompt = self._re_prompt.pattern
# having expected prompt visible simplifies troubleshooting
return "{}, prompt_regex:r'{}')".format(base_str[:-1], expected_prompt)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='moler', # Required
version='2.3.0', # Required
version='2.3.1', # Required
description='Moler is library to help in building automated tests', # Required
long_description=long_description, # Optional
long_description_content_type='text/markdown', # Optional (see note above)
Expand Down

0 comments on commit c8fbe91

Please sign in to comment.