Went on a PEP-8 rampage
This commit is contained in:
parent
f99ad30fb6
commit
0948c9308a
36 changed files with 186 additions and 218 deletions
|
|
@ -3,6 +3,7 @@ from PIL import Image
|
|||
from io import BytesIO
|
||||
import numpy as np
|
||||
|
||||
|
||||
class APIconnection:
|
||||
def __init__(self, host="localhost", port=5000, api_ver="v1"):
|
||||
self.base = self.build_base(host=host, port=port, api_ver=api_ver)
|
||||
|
|
@ -100,4 +101,4 @@ class APIconnection:
|
|||
return self.post('/camera/zoom', json=json)
|
||||
|
||||
def get_zoom(self):
|
||||
return self.get('/camera/zoom')
|
||||
return self.get('/camera/zoom')
|
||||
|
|
|
|||
|
|
@ -1,19 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
from api_client import APIconnection
|
||||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
import time
|
||||
import numpy as np
|
||||
import uuid
|
||||
|
||||
from PIL import Image
|
||||
|
||||
import unittest
|
||||
from pprint import pprint
|
||||
|
||||
import logging, sys
|
||||
import logging
|
||||
import sys
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
|
||||
|
||||
|
||||
|
|
@ -66,6 +58,7 @@ class TestCapture(unittest.TestCase):
|
|||
|
||||
self.assertTrue(capture_array.shape == (resolution[1], resolution[0], 3))
|
||||
|
||||
|
||||
class TestStage(unittest.TestCase):
|
||||
|
||||
def test_stage_config(self):
|
||||
|
|
@ -114,6 +107,7 @@ class TestStage(unittest.TestCase):
|
|||
|
||||
self.assertTrue(np.array_equal(diff, move))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
suites = [
|
||||
|
|
|
|||
|
|
@ -3,17 +3,15 @@ from openflexure_microscope.camera.pi import StreamingCamera, CaptureObject
|
|||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
import time
|
||||
import numpy as np
|
||||
import uuid
|
||||
|
||||
from PIL import Image
|
||||
|
||||
import unittest
|
||||
from pprint import pprint
|
||||
|
||||
import logging, sys
|
||||
import logging
|
||||
import sys
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -46,4 +46,3 @@ if __name__ == '__main__':
|
|||
alltests = unittest.TestSuite(suites)
|
||||
|
||||
result = unittest.TextTestRunner(verbosity=2).run(alltests)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,13 @@
|
|||
#!/usr/bin/env python
|
||||
from openflexure_microscope.camera.pi import StreamingCamera
|
||||
from openflexure_stage import OpenFlexureStage
|
||||
from openflexure_microscope import Microscope
|
||||
|
||||
import os
|
||||
import io
|
||||
import sys
|
||||
import time
|
||||
import numpy as np
|
||||
import uuid
|
||||
|
||||
from PIL import Image
|
||||
|
||||
import unittest
|
||||
from pprint import pprint
|
||||
|
||||
import logging, sys
|
||||
import logging
|
||||
import sys
|
||||
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue