Skip to content

Commit

Permalink
WIP add pypy check
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan committed Dec 28, 2023
1 parent c8421bb commit 8074e5a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_command_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ def running_on_github_actions():
return os.environ.get("RUNNING_ON_GITHUB_ACTIONS") == "true" # bash 'true'


def test_interpreter():
print("PLATFORM INTERPRETER", platform.python_implementation())
def is_pypy():
"""
Checks interpreter
"""
return True if platform.python_implementation().lower() == "pypy" else False


def xtest_standard_ping_with_encoding():
Expand Down Expand Up @@ -274,7 +277,7 @@ def xtest_create_no_window():
assert exit_code == 0, 'Should have worked too with method {}'.format(method)


def xtest_read_file():
def test_read_file():
"""
Read a couple of times the same file to be sure we don't get garbage from _read_pipe()
This is a random failure detection test
Expand All @@ -290,7 +293,8 @@ def xtest_read_file():
for method in methods:
# pypy is quite slow with poller method on github actions.
# Lets lower rounds
max_rounds = 50 if platform.python_implementation() == 'PyPy' else 1000
max_rounds = 50 if is_pypy() else 1000
print("GOING FOR ROUNDS:", max_rounds)
for round in range(0, max_rounds):
print('Comparaison round {} with method {}'.format(round, method))
exit_code, output = command_runner(PRINT_FILE_CMD, shell=True, method=method)
Expand Down

0 comments on commit 8074e5a

Please sign in to comment.