@@ -10,26 +10,27 @@ def test_run_module(self):
10
10
import numpy as np
11
11
12
12
arr = np .random .random ((3 , 3 ))
13
- det = np .linalg .det (arr )
13
+ np .linalg .det (arr )
14
+
14
15
15
16
class ScipyTestCase (PythonTestMixIn , TestCase ):
16
17
module_import = 'scipy'
17
18
18
19
def test_run_module (self ):
19
20
import numpy as np
20
- from scipy .cluster .vq import vq , kmeans , whiten
21
- features = np .array ([[ 1.9 ,2.3 ],
22
- [ 1.5 ,2.5 ],
23
- [ 0.8 ,0.6 ],
24
- [ 0.4 ,1.8 ],
25
- [ 0.1 ,0.1 ],
26
- [ 0.2 ,1.8 ],
27
- [ 2.0 ,0.5 ],
28
- [ 0.3 ,1.5 ],
29
- [ 1.0 ,1.0 ]])
21
+ from scipy .cluster .vq import kmeans , whiten
22
+ features = np .array ([[1.9 , 2.3 ],
23
+ [ 1.5 , 2.5 ],
24
+ [ 0.8 , 0.6 ],
25
+ [ 0.4 , 1.8 ],
26
+ [ 0.1 , 0.1 ],
27
+ [ 0.2 , 1.8 ],
28
+ [ 2.0 , 0.5 ],
29
+ [ 0.3 , 1.5 ],
30
+ [ 1.0 , 1.0 ]])
30
31
whitened = whiten (features )
31
- book = np .array ((whitened [0 ],whitened [2 ]))
32
- print ('kmeans' , kmeans (whitened ,book ))
32
+ book = np .array ((whitened [0 ], whitened [2 ]))
33
+ print ('kmeans' , kmeans (whitened , book ))
33
34
34
35
35
36
class OpensslTestCase (PythonTestMixIn , TestCase ):
@@ -58,7 +59,7 @@ class KivyTestCase(PythonTestMixIn, TestCase):
58
59
def test_run_module (self ):
59
60
# This import has side effects, if it works then it's an
60
61
# indication that Kivy is okay
61
- from kivy .core .window import Window
62
+ from kivy .core .window import Window # noqa: F401
62
63
63
64
64
65
class PyjniusTestCase (PythonTestMixIn , TestCase ):
@@ -102,7 +103,6 @@ def test_run_module(self):
102
103
import os
103
104
from PIL import (
104
105
Image as PilImage ,
105
- ImageOps ,
106
106
ImageFont ,
107
107
ImageDraw ,
108
108
ImageFilter ,
@@ -175,7 +175,7 @@ def test_run_module(self):
175
175
f = Fernet (key )
176
176
cryptography_encrypted = f .encrypt (
177
177
b'A really secret message. Not for prying eyes.' )
178
- cryptography_decrypted = f .decrypt (cryptography_encrypted )
178
+ f .decrypt (cryptography_encrypted )
179
179
180
180
181
181
class PycryptoTestCase (PythonTestMixIn , TestCase ):
@@ -187,7 +187,7 @@ def test_run_module(self):
187
187
crypto_hash_message = 'A secret message'
188
188
hash = SHA256 .new ()
189
189
hash .update (crypto_hash_message )
190
- crypto_hash_hexdigest = hash .hexdigest ()
190
+ hash .hexdigest ()
191
191
192
192
193
193
class PycryptodomeTestCase (PythonTestMixIn , TestCase ):
@@ -211,7 +211,7 @@ def test_run_module(self):
211
211
'ok' if os .path .exists ("rsa_key.bin" ) else 'fail' ))
212
212
self .assertTrue (os .path .exists ("rsa_key.bin" ))
213
213
214
- print ('\t -> Testing Public key:' .format (key .publickey ().export_key ()))
214
+ print ('\t -> Testing Public key: {} ' .format (key .publickey ().export_key ()))
215
215
216
216
217
217
class ScryptTestCase (PythonTestMixIn , TestCase ):
@@ -229,7 +229,7 @@ class M2CryptoTestCase(PythonTestMixIn, TestCase):
229
229
230
230
def test_run_module (self ):
231
231
from M2Crypto import SSL
232
- ctx = SSL .Context ('sslv23' )
232
+ SSL .Context ('sslv23' )
233
233
234
234
235
235
class Pysha3TestCase (PythonTestMixIn , TestCase ):
0 commit comments