Skip to content

Commit

Permalink
Enable UI tests on dev branch again
Browse files Browse the repository at this point in the history
They might be more stable now after the term changes.
Ref #1647
  • Loading branch information
peace-maker committed Feb 19, 2024
1 parent d9b3e17 commit 1974eb0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
1 change: 0 additions & 1 deletion docs/source/conf.py
Expand Up @@ -97,7 +97,6 @@ def __setattr__(self, name, value):
github_actions = os.environ.get('USER') == 'runner'
travis_ci = os.environ.get('USER') == 'travis'
local_doctest = os.environ.get('USER') == 'pwntools'
branch_dev = os.environ.get('GITHUB_BASE_REF') == 'dev'
skip_android = True
'''

Expand Down
30 changes: 1 addition & 29 deletions pwnlib/ui.py
Expand Up @@ -61,10 +61,6 @@ def yesno(prompt, default=None):
`True` if the answer was "yes", `False` if "no"
Examples:
.. doctest::
:skipif: branch_dev
>>> yesno("A number:", 20)
Traceback (most recent call last):
...
Expand All @@ -83,10 +79,6 @@ def yesno(prompt, default=None):
[?] is it good 3 [yes/No] False
Tests:
.. doctest::
:skipif: branch_dev
>>> p = testpwnproc("print(yesno('is it ok??'))")
>>> b"is it ok" in p.recvuntil(b"??")
True
Expand Down Expand Up @@ -148,20 +140,12 @@ def options(prompt, opts, default = None):
The users choice in the form of an integer.
Examples:
.. doctest::
:skipif: branch_dev
>>> options("Select a color", ("red", "green", "blue"), "green")
Traceback (most recent call last):
...
ValueError: options(): default must be a number or None
Tests:
.. doctest::
:skipif: branch_dev
>>> p = testpwnproc("print(options('select a color', ('red', 'green', 'blue')))")
>>> p.sendline(b"\33[C\33[A\33[A\33[B\33[1;5A\33[1;5B 0310")
>>> _ = p.recvall()
Expand Down Expand Up @@ -272,10 +256,6 @@ def pause(n=None):
r"""Waits for either user input or a specific number of seconds.
Examples:
.. doctest::
:skipif: branch_dev
>>> with context.local(log_level="INFO"):
... pause(1)
[x] Waiting
Expand All @@ -287,10 +267,6 @@ def pause(n=None):
ValueError: pause(): n must be a number or None
Tests:
.. doctest::
:skipif: branch_dev
>>> saved_stdin = sys.stdin
>>> try:
... sys.stdin = io.TextIOWrapper(io.BytesIO(b"\n"))
Expand Down Expand Up @@ -335,11 +311,7 @@ def more(text):
Returns:
:const:`None`
Tests:
.. doctest::
:skipif: branch_dev
Tests:
>>> more("text")
text
>>> p = testpwnproc("more('text\\n' * (term.height + 2))")
Expand Down

0 comments on commit 1974eb0

Please sign in to comment.