Skip to content

Commit

Permalink
Travis fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed May 9, 2019
1 parent 6230c6a commit 570ba9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: xenial
language: python
sudo: false

Expand All @@ -9,14 +10,9 @@ python:
- "3.4"
- "3.5"
- "3.6"
# - "3.7" # TODO: enable after https://github.com/travis-ci/travis-ci/issues/9815 will be fixed
- "pypy3.5-5.7.1-beta"

jobs:
include:
- python: 3.7
dist: xenial
sudo: required
- "3.7"
- "pypy2.7-6.0"
- "pypy3.5-6.0"

cache:
directories:
Expand All @@ -35,7 +31,7 @@ install:

script:
- |
if [[ "$TRAVIS_PYTHON_VERSION" != "pypy3.5-5.7.1-beta" ]]
if [[ "$TRAVIS_PYTHON_VERSION" != pypy* ]]
then
pre-commit run --all-files
fi
Expand Down
7 changes: 7 additions & 0 deletions test/test_cose.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@

import unittest

try:
import __pypy__ # noqa
PYPY = True
except ImportError:
PYPY = False


_ES256_KEY = a2b_hex(b'A5010203262001215820A5FD5CE1B1C458C530A54FA61B31BF6B04BE8B97AFDE54DD8CBB69275A8A1BE1225820FA3A3231DD9DEED9D1897BE5A6228C59501E4BCD12975D3DFF730F01278EA61C') # noqa
_RS256_KEY = a2b_hex(b'A401030339010020590100B610DCE84B65029FAE24F7BF8A1730D37BC91435642A628E691E9B030BF3F7CEC59FF91CBE82C54DE16C136FA4FA8A58939B5A950B32E03073592FEC8D8B33601C04F70E5E2D5CF7B4E805E1990EA5A86928A1B390EB9026527933ACC03E6E41DC0BE40AA5EB7B9B460743E4DD80895A758FB3F3F794E5E9B8310D3A60C28F2410D95CF6E732749A243A30475267628B456DE770BC2185BBED1D451ECB0062A3D132C0E4D842E0DDF93A444A3EE33A85C2E913156361713155F1F1DC64E8E68ED176466553BBDE669EB82810B104CB4407D32AE6316C3BD6F382EC3AE2C5FD49304986D64D92ED11C25B6C5CF1287233545A987E9A3E169F99790603DBA5C8AD2143010001') # noqa
Expand Down Expand Up @@ -72,6 +78,7 @@ def test_RS256_parse_verify(self):
a2b_hex(b'071B707D11F0E7F62861DFACA89C4E674321AD8A6E329FDD40C7D6971348FBB0514E7B2B0EFE215BAAC0365C4124A808F8180D6575B710E7C01DAE8F052D0C5A2CE82F487C656E7AD824F3D699BE389ADDDE2CBF39E87A8955E93202BAE8830AB4139A7688DFDAD849F1BB689F3852BA05BED70897553CC44704F6941FD1467AD6A46B4DAB503716D386FE7B398E78E0A5A8C4040539D2C9BFA37E4D94F96091FFD1D194DE2CA58E9124A39757F013801421E09BD261ADA31992A8B0386A80AF51A87BD0CEE8FDAB0D4651477670D4C7B245489BED30A57B83964DB79418D5A4F5F2E5ABCA274426C9F90B007A962AE15DFF7343AF9E110746E2DB9226D785C6') # noqa
)

@unittest.skipIf(PYPY, 'EdDSA not supported under pypy')
def test_EdDSA_parse_verify(self):
key = CoseKey.parse(cbor.decode(_EdDSA_KEY))
self.assertIsInstance(key, EdDSA)
Expand Down

0 comments on commit 570ba9c

Please sign in to comment.