Skip to content

Commit

Permalink
Removing Python 2 compatibility from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchassassin committed Aug 6, 2020
1 parent 588efc5 commit bcaf1f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 3 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ environment:
secure: 1+JDFvadY94ojZGhbEeZ/G0of7zzFWwXaj4Mx0Th0Lo=
matrix:

# Python 2.7.12 is the latest version and is not pre-installed.

- PYTHON: "C:\\Python27"
- PYTHON: "C:\\Python27-x64"

- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python36-x64"

- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python37-x64"

- PYTHON: "C:\\Python38"
- PYTHON: "C:\\Python38-x64"

install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
Expand Down
8 changes: 1 addition & 7 deletions tests/appveyor_test_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
import os
import lackey

# Python 2/3 compatibility
try:
unittest.TestCase.assertRegex
except AttributeError:
unittest.TestCase.assertRegex = unittest.TestCase.assertRegexpMatches

class TestMouseMethods(unittest.TestCase):
def setUp(self):
self.mouse = lackey.Mouse()
Expand Down Expand Up @@ -56,7 +50,7 @@ def testScreenInfo(self):

def testCapture(self):
tpath = self.primaryScreen.capture()
self.assertIsInstance(tpath, numpy.ndarray)
self.assertIsInstance(tpath, str)


class TestLocationMethods(unittest.TestCase):
Expand Down

0 comments on commit bcaf1f5

Please sign in to comment.