Skip to content

Commit

Permalink
UnitaryTests: remove use of "from __future__"
Browse files Browse the repository at this point in the history
The code now uses Python 3 so no need to use "from __future__ import
print_function" any more.
  • Loading branch information
LudovicRousseau committed May 14, 2021
1 parent 41b7f53 commit 757a7d7
Show file tree
Hide file tree
Showing 33 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion UnitaryTests/CheckAutoPowerOff.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

# check te card is not auto powered off after a SCardReconnect()

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import sys
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, FEATURE_CCID_ESC_COMMAND,
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/FEATURE_CCID_ESC_COMMAND_Xiring.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED bit in the ifdDriverOptions
# option of the CCID driver Info.plist file

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (getFeatureRequest, hasFeature,
getTlvProperties, FEATURE_CCID_ESC_COMMAND, SCARD_SHARE_DIRECT)
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/FEATURE_GET_TLV_PROPERTIES.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED bit in the ifdDriverOptions
# option of the CCID driver Info.plist file

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import getTlvProperties, SCARD_SHARE_DIRECT

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/MCT_ReaderDirect.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, FEATURE_MCT_READER_DIRECT, getFeatureRequest, hasFeature)
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBeginTransaction_Disconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# corresponding SCardEndTransaction(). OpenSC "pkcs11-tool -I" exhibits
# such a behavior.

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBeginTransaction_ExclusiceMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# Alioth bug [#312960] SCardDisconnect when other context has transaction
# fixed in revisions 5572 and 5574

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBeginTransaction_Reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# transaction is ongoing.
# Test for the patch in 74656f24db3da1532040a1775ceffa225fbc3d00

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
from time import sleep
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBeginTransaction_SharedMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# SCardReleaseContext() should not release a PC/SC transaction not
# started by the released context

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import threading
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBeginTransaction_deadlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# https://archives.neohapsis.com/archives/dev/muscle/2012-q2/0109.html
# fixed in revisions 6358, 6359, 6360 and 6361

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import threading
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardBlockingBehaviourTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


from __future__ import print_function
import sys
import thread
import time
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardCancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# with this program; if not, see <https://www.gnu.org/licenses/>.


from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import threading
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardCancel2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# SCardCancel() should do nothing if no cancellable call is ongoing
# bug fixed in revision 5344

from __future__ import print_function
from smartcard.scard import *

try:
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardCancel3.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

# The bug has been fixed in 57b0ba5a200bcbf1c489d39261340324392a8e8a

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import threading
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardConnect_DIRECT.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# has been implemented in revision 4332 but reverted in revision 4940 so
# that the protocol is not negociated again

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardConnect_DIRECT2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
# same issue with Reconnect instead of connect
# bug fixed in revision 4940

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardEndTransaction_extra_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# SCardEndTransaction() should return SCARD_E_NOT_TRANSACTED if called
# more times than SCardBeginTransaction()

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardExclusiveBehaviour.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
from smartcard.Exceptions import NoReadersException
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardGetAttrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# SCARD_ATTR_VENDOR_IFD_SERIAL_NO support has been added in ccid 1.3.13
# SCARD_ATTR_ATR_STRING support has been added in ccid 0.9.0

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
from smartcard.util import toHexString, toASCIIString
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardGetStatusChange.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
# * - FIXME: Mac?
# */

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardGetStatusChange2.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# Check the return value of SCardGetStatusChange() for unknown readers
# Before revision 5881 SCardGetStatusChange() returned SCARD_S_SUCCESS

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardReconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# when the reconnection requests exclusive access and the reader is
# already shared.

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import sys
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCardStatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# with this program; if not, see <https://www.gnu.org/licenses/>.


from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import sys
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/SCard_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# #define DO_CHECK_SAME_PROCESS
# or this unitary test will fail

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import time
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/ThreadSafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# with this program; if not, see <https://www.gnu.org/licenses/>.


from __future__ import print_function
from smartcard.scard import (SCardEstablishContext, SCardReleaseContext,
SCardGetErrorMessage, SCARD_SCOPE_USER, SCARD_S_SUCCESS)
from smartcard.pcsc.PCSCExceptions import *
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/ThreadSafeConnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# with this program; if not, see <https://www.gnu.org/licenses/>.


from __future__ import print_function
from smartcard.scard import (SCardEstablishContext, SCardReleaseContext,
SCardListReaders, SCardConnect, SCardDisconnect,
SCARD_SHARE_SHARED, SCARD_PROTOCOL_ANY, SCARD_LEAVE_CARD,
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/control_get_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, SCARD_CTL_CODE, getTlvProperties)
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/control_switch_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, SCARD_CTL_CODE)
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/getAttrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.scard import (SCARD_ATTR_VENDOR_NAME, SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, SCARD_ATTR_DEVICE_FRIENDLY_NAME,
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/reset_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.scard import *
from smartcard.pcsc.PCSCExceptions import *
import sys
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/stress_apdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from time import time, ctime

Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/stress_get_firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import readers
from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
SCARD_LEAVE_CARD, SCARD_CTL_CODE)
Expand Down
1 change: 0 additions & 1 deletion UnitaryTests/transmit_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, see <https://www.gnu.org/licenses/>.

from __future__ import print_function
from smartcard.System import *
from smartcard.CardConnection import *

Expand Down

0 comments on commit 757a7d7

Please sign in to comment.