diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..29f1bd354 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,56 @@ +name: main +on: + pull_request: + push: + branches: [master, 'test-me-*'] + tags: ['*'] + +jobs: + main: + strategy: + matrix: + include: + - os: windows-latest + py: 2.7 + toxenv: py + - os: windows-latest + py: 3.9 + toxenv: py + - os: ubuntu-latest + py: pypy2 + toxenv: py + - os: ubuntu-latest + py: pypy3 + toxenv: py + - os: ubuntu-latest + py: 2.7 + toxenv: py + - os: ubuntu-latest + py: 3.4 + toxenv: py + - os: ubuntu-latest + py: 3.5 + toxenv: py + - os: ubuntu-latest + py: 3.6 + toxenv: py + - os: ubuntu-latest + py: 3.7 + toxenv: py + - os: ubuntu-latest + py: 3.8 + toxenv: py + - os: ubuntu-latest + py: 3.9 + toxenv: py + - os: ubuntu-latest + py: 3.9 + toxenv: flake8 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + - run: pip install tox + - run: tox -e ${{ matrix.toxenv }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 696c1c0eb..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -dist: xenial -language: python -cache: pip -sudo: false -install: - - pip install tox -script: tox -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 - - python: 3.8 - env: TOXENV=py38 - - python: pypy2.7-6.0 - env: TOXENV=pypy - - python: pypy3.5-6.0 - env: TOXENV=pypy3 - - python: 3.5 - env: TOXENV=flake8 - -notifications: - email: - - IanLee1521@gmail.com - irc: - channels: - - "irc.freenode.org##python-code-quality" - use_notice: true - skip_join: true diff --git a/testsuite/test_util.py b/testsuite/test_util.py index 7eff16aed..075b163c9 100644 --- a/testsuite/test_util.py +++ b/testsuite/test_util.py @@ -8,8 +8,6 @@ class UtilTestCase(unittest.TestCase): def test_normalize_paths(self): - cwd = os.getcwd() - self.assertEqual(normalize_paths(''), []) self.assertEqual(normalize_paths([]), []) self.assertEqual(normalize_paths(None), []) @@ -17,7 +15,11 @@ def test_normalize_paths(self): self.assertEqual(normalize_paths('foo'), ['foo']) self.assertEqual(normalize_paths('foo,bar'), ['foo', 'bar']) self.assertEqual(normalize_paths('foo, bar '), ['foo', 'bar']) - self.assertEqual(normalize_paths('/foo/bar,baz/../bat'), - [os.path.realpath('/foo/bar'), cwd + '/bat']) - self.assertEqual(normalize_paths(".pyc,\n build/*"), - ['.pyc', cwd + '/build/*']) + self.assertEqual( + normalize_paths('/foo/bar,baz/../bat'), + [os.path.realpath('/foo/bar'), os.path.abspath('bat')], + ) + self.assertEqual( + normalize_paths(".pyc,\n build/*"), + ['.pyc', os.path.abspath('build/*')], + )