diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c2f2660 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: Run all tests + +on: [push] + +jobs: + build: + runs-on: ubuntu-18.04 + strategy: + fail-fast: false + matrix: + python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Show Python version + run: python -V + + - name: Run the tests + run: python setup.py test -q diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e8305a1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: python -sudo: false -matrix: - include: - - python: 2.7 - env: TOXENV=py27 - - python: 3.4 - env: TOXENV=py34 - - python: 3.5 - env: TOXENV=py35 - - python: 3.6 - env: TOXENV=py36 - - python: 3.7 - env: TOXENV=py37 - dist: xenial # required for Python >= 3.7 - - python: pypy - env: TOXENV=pypy -install: - # tox is pinned for python 3.4 support - - travis_retry pip install tox==3.14.0 -script: - - travis_retry tox diff --git a/py65/utils/console.py b/py65/utils/console.py index 0678422..b31f1b7 100644 --- a/py65/utils/console.py +++ b/py65/utils/console.py @@ -48,7 +48,7 @@ else: oldstdin = None def get_unbuffered_stdin(stdin): - """ Attempt to get and return a copy of stdin that is + """ Attempt to get and return a copy of stdin that is unbuffered. This allows for immediate response to typed input as well as pasted input. If unable to get an unbuffered version of stdin, return the original version. @@ -74,7 +74,7 @@ else: def save_mode(stdin): """ For operating systems that support it, save the original - input termios settings so they can be restored later. This + input termios settings so they can be restored later. This allows us to switch to noncanonical mode when software is running in the simulator and back to the original mode when accepting commands. @@ -121,9 +121,9 @@ else: # Quietly ignore termios errors, such as stdin not being # a tty. pass - + def restore_mode(): - """For operating systems that support it, restore the previous + """For operating systems that support it, restore the previous input mode. """ @@ -188,7 +188,7 @@ else: pass # Convert linefeeds to carriage returns. - if char != '' and ord(char) == 10: + if len(char) and ord(char) == 10: char = '\r' return char diff --git a/tox.ini b/tox.ini deleted file mode 100644 index c75642d..0000000 --- a/tox.ini +++ /dev/null @@ -1,7 +0,0 @@ -[tox] -envlist = - py27,py34,py35,py36,py37,pypy - -[testenv] -commands = - python setup.py test -q