Skip to content

Commit

Permalink
libusb1 now installed on travis container
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Mar 18, 2017
1 parent 79eeba3 commit 43b02ff
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 55 deletions.
5 changes: 1 addition & 4 deletions tests/base_clf_pn53x.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
import nfc.clf
import nfc.clf.pn53x

import sys
import pytest
from pytest_mock import mocker # noqa: F401
from mock import Mock, call
from mock import call
from binascii import hexlify

sys.modules['usb1'] = Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
5 changes: 1 addition & 4 deletions tests/test_clf_pn531.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
import nfc.clf
import nfc.clf.pn531

import sys
import pytest
from pytest_mock import mocker # noqa: F401
from mock import Mock, call
from mock import call
from binascii import hexlify

import base_clf_pn53x
Expand All @@ -20,8 +19,6 @@
logging.getLogger("nfc.clf").setLevel(logging_level)
logging.getLogger("nfc.clf.pn531").setLevel(logging_level)

sys.modules['usb1'] = Mock # fake usb1 for testing on travis-ci


@pytest.fixture() # noqa: F811
def transport(mocker):
Expand Down
5 changes: 0 additions & 5 deletions tests/test_clf_pn532.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@
import nfc.clf
import nfc.clf.pn532

import sys
import pytest
from pytest_mock import mocker # noqa: F401
from mock import Mock
# from binascii import hexlify

import base_clf_pn53x
from base_clf_pn53x import CMD, RSP, ACK, NAK, ERR, HEX # noqa: F401
Expand All @@ -20,8 +17,6 @@
logging.getLogger("nfc.clf").setLevel(logging_level)
logging.getLogger("nfc.clf.pn533").setLevel(logging_level)

sys.modules['usb1'] = Mock # fake usb1 for testing on travis-ci


@pytest.fixture() # noqa: F811
def transport(mocker):
Expand Down
6 changes: 1 addition & 5 deletions tests/test_clf_pn533.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
import nfc.clf
import nfc.clf.pn533

import sys
import pytest
from pytest_mock import mocker # noqa: F401
from mock import Mock, call
# from binascii import hexlify
from mock import call

import base_clf_pn53x
from base_clf_pn53x import CMD, RSP, ACK, NAK, ERR, HEX # noqa: F401
Expand All @@ -20,8 +18,6 @@
logging.getLogger("nfc.clf").setLevel(logging_level)
logging.getLogger("nfc.clf.pn533").setLevel(logging_level)

sys.modules['usb1'] = Mock # fake usb1 for testing on travis-ci


@pytest.fixture() # noqa: F811
def transport(mocker):
Expand Down
7 changes: 1 addition & 6 deletions tests/test_llcp_pdu.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division

import sys
import pytest
from mock import MagicMock

sys.modules['usb1'] = MagicMock

import nfc.llcp.pdu # noqa: E402
import nfc.llcp.pdu


# =============================================================================
Expand Down
7 changes: 1 addition & 6 deletions tests/test_llcp_sec.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division

import sys
import time
import pytest
from mock import MagicMock

sys.modules['usb1'] = MagicMock

import nfc.llcp.sec # noqa: E402
import nfc.llcp.sec


# =============================================================================
Expand Down
4 changes: 0 additions & 4 deletions tests/test_tag_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import nfc
import nfc.tag

import sys
import mock
import ndef
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -15,8 +13,6 @@
logging_level = logging.getLogger().getEffectiveLevel()
logging.getLogger("nfc.tag").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt1

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -16,8 +15,6 @@
logging.getLogger("nfc.tag").setLevel(logging_level)
logging.getLogger("nfc.tag.tt1").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt1_broadcom.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt1

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -17,8 +16,6 @@
logging.getLogger("nfc.tag.tt1").setLevel(logging_level)
logging.getLogger("nfc.tag.tt1_broadcom").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt2

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -16,8 +15,6 @@
logging.getLogger("nfc.tag").setLevel(logging_level)
logging.getLogger("nfc.tag.tt2").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt2_nxp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt2

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -16,8 +15,6 @@
logging.getLogger("nfc.tag").setLevel(logging_level)
logging.getLogger("nfc.tag.tt2").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt3.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt3

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -16,8 +15,6 @@
logging.getLogger("nfc.tag").setLevel(logging_level)
logging.getLogger("nfc.tag.tt3").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt3_sony.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt3

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -17,8 +16,6 @@
logging.getLogger("nfc.tag.tt3").setLevel(logging_level)
logging.getLogger("nfc.tag.tt3_sony").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down
3 changes: 0 additions & 3 deletions tests/test_tag_tt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import nfc.tag
import nfc.tag.tt4

import sys
import mock
import pytest
from pytest_mock import mocker # noqa: F401
Expand All @@ -16,8 +15,6 @@
logging.getLogger("nfc.tag").setLevel(logging_level)
logging.getLogger("nfc.tag.tt4").setLevel(logging_level)

sys.modules['usb1'] = mock.Mock # fake usb1 for testing on travis-ci


def HEX(s):
return bytearray.fromhex(s)
Expand Down

0 comments on commit 43b02ff

Please sign in to comment.