diff --git a/__init__.py b/__init__.py index 7826ade..8a462b0 100644 --- a/__init__.py +++ b/__init__.py @@ -16,6 +16,7 @@ media (Media Tools) **Submodules:** * :func:`media.get_media_data` +* :class:`media.image` **Unittest:** @@ -24,7 +25,7 @@ media (Media Tools) __DEPENDENCIES__ = [] import logging -from media import metadata +from PIL import Image, ImageEnhance logger_name = 'MEDIA' logger = logging.getLogger(logger_name) @@ -37,14 +38,161 @@ __INTERPRETER__ = (3, ) """The Tested Interpreter-Versions""" +KEY_ALBUM = 'album' +KEY_APERTURE = 'aperture' +KEY_ARTIST = 'artist' +KEY_BITRATE = 'bitrate' +KEY_CAMERA = 'camera' +KEY_DURATION = 'duration' +KEY_EXPOSURE_PROGRAM = 'exposure_program' +KEY_EXPOSURE_TIME = 'exposure_time' +KEY_FLASH = 'flash' +KEY_FOCAL_LENGTH = 'focal_length' +KEY_GENRE = 'genre' +KEY_GPS = 'gps' +KEY_HEIGHT = 'height' +KEY_ISO = 'iso' +KEY_ORIENTATION = 'orientation' +KEY_RATIO = 'ratio' +KEY_SIZE = 'size' +KEY_TIME = 'time' # USE time.localtime(value) or datetime.fromtimestamp(value) to convert the timestamp +KEY_TIME_IS_SUBSTITUTION = 'tm_is_subst' +KEY_TITLE = 'title' +KEY_TRACK = 'track' +KEY_WIDTH = 'width' +KEY_YEAR = 'year' + + def get_media_data(full_path): - ft = metadata.get_filetype(full_path) + from media.metadata import get_audio_data, get_image_data, get_video_data + from media.common import get_filetype, FILETYPE_AUDIO, FILETYPE_IMAGE, FILETYPE_VIDEO # - if ft == metadata.FILETYPE_AUDIO: - return metadata.get_audio_data(full_path) - elif ft == metadata.FILETYPE_IMAGE: - return metadata.get_image_data(full_path) - elif ft == metadata.FILETYPE_VIDEO: - return metadata.get_video_data(full_path) + ft = get_filetype(full_path) + # + if ft == FILETYPE_AUDIO: + return get_audio_data(full_path) + elif ft == FILETYPE_IMAGE: + return get_image_data(full_path) + elif ft == FILETYPE_VIDEO: + return get_video_data(full_path) else: logger.warning('Filetype not known: %s', full_path) + + +ORIENTATION_NORMAL = 1 +ORIENTATION_VERTICAL_MIRRORED = 2 +ORIENTATION_HALF_ROTATED = 3 +ORIENTATION_HORIZONTAL_MIRRORED = 4 +ORIENTATION_LEFT_ROTATED = 6 +ORIENTATION_RIGHT_ROTATED = 8 + +JOIN_TOP_LEFT = 1 +JOIN_TOP_RIGHT = 2 +JOIN_BOT_LEFT = 3 +JOIN_BOT_RIGHT = 4 +JOIN_CENTER = 5 + + +class image(object): + def __init__(self, media_instance=None): + if media_instance is not None: + self.load_from_file(media_instance) + else: + self._im = None + + def load_from_file(self, media_instance): + from media.convert import get_pil_image + # + self._im = get_pil_image(media_instance) + if self._im is None: + return False + return True + + def save(self, full_path): + if self._im is None: + logger.warning('No image available to be saved (%s)', repr(full_path)) + return False + else: + logger.debug('Saving image to %s', repr(full_path)) + with open(full_path, 'w') as fh: + im = self._im.convert('RGB') + im.save(fh, 'JPEG') + return True + + def resize(self, max_size): + if self._im is None: + logger.warning('No image available to be resized') + return False + else: + logger.debug('Resizing picture to max %d pixel in whatever direction', max_size) + x, y = self._im.size + xy_max = max(x, y) + self._im = self._im.resize((int(x * float(max_size) / xy_max), int(y * float(max_size) / xy_max)), Image.NEAREST).rotate(0) + return True + + def rotate_by_orientation(self, orientation): + if self._im is None: + logger.warning('No image available, rotation not possible') + return False + + if orientation == ORIENTATION_HALF_ROTATED: + angle = 180 + elif orientation == ORIENTATION_LEFT_ROTATED: + angle = 270 + elif orientation == ORIENTATION_RIGHT_ROTATED: + angle = 90 + else: + logger.warning('Orientation %s unknown for rotation', repr(orientation)) + return False + logger.debug('Rotating picture by %d°', angle) + self._im = self._im.rotate(angle, expand=True) + return True + + def join(self, join_image, join_pos=JOIN_TOP_RIGHT, opacity=0.7): + from media.convert import get_pil_image + + def rgba_copy(im): + if im.mode != 'RGBA': + return im.convert('RGBA') + else: + return im.copy() + + if self._im is None: + logger.warning('No image available, joining not possible') + return False + + # ensure type of join_image is PIL.Image + join_image = get_pil_image(join_image) + if join_image is None: + logger.warning('Image to be joined is not supported %s', repr(join_image)) + return False + + im2 = rgba_copy(join_image) + # change opacity of im2 + alpha = im2.split()[3] + alpha = ImageEnhance.Brightness(alpha).enhance(opacity) + im2.putalpha(alpha) + + self._im = rgba_copy(self._im) + + # create a transparent layer + layer = Image.new('RGBA', self._im.size, (0, 0, 0, 0)) + # draw im2 in layer + if join_pos == JOIN_TOP_LEFT: + layer.paste(im2, (0, 0)) + elif join_pos == JOIN_TOP_RIGHT: + layer.paste(im2, ((self._im.size[0] - im2.size[0]), 0)) + elif join_pos == JOIN_BOT_LEFT: + layer.paste(im2, (0, (self._im.size[1] - im2.size[1]))) + elif join_pos == JOIN_BOT_RIGHT: + layer.paste(im2, ((self._im.size[0] - im2.size[0]), (self._im.size[1] - im2.size[1]))) + elif join_pos == JOIN_CENTER: + layer.paste(im2, (int((self._im.size[0] - im2.size[0]) / 2), int((self._im.size[1] - im2.size[1]) / 2))) + else: + logger.warning("Join position value %s is not supported", join_pos) + return False + + logger.debug('Joining two images') + self._im = Image.composite(layer, self._im, layer) + + return True diff --git a/_testresults_/coverage.xml b/_testresults_/coverage.xml index 415574f..6032fa0 100644 --- a/_testresults_/coverage.xml +++ b/_testresults_/coverage.xml @@ -1,34 +1,168 @@ - + - + - + - - + - + - - - + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + @@ -38,12 +172,46 @@ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -58,8 +226,6 @@ - - @@ -67,163 +233,129 @@ + - - - + - - + + + - - - - - + + + - - - - + + - - - - + + + + + - - - - + + + + - - - - - + + + + + + + - + + + - - - + + + + - - - + + + - - - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/_testresults_/unittest.json b/_testresults_/unittest.json index b91a42c..fa62312 100644 --- a/_testresults_/unittest.json +++ b/_testresults_/unittest.json @@ -1,11 +1,11 @@ { "coverage_information": [ { - "branch_coverage": 97.61999999999999, + "branch_coverage": 96.43, "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media", "files": [ { - "branch_coverage": 97.61999999999999, + "branch_coverage": 96.43, "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media/__init__.py", "fragments": [ { @@ -20,96 +20,434 @@ }, { "coverage_state": "clean", - "end": 23, + "end": 24, "start": 5 }, { "coverage_state": "covered", - "end": 24, - "start": 24 - }, - { - "coverage_state": "clean", "end": 25, "start": 25 }, { - "coverage_state": "covered", - "end": 27, + "coverage_state": "clean", + "end": 26, "start": 26 }, { - "coverage_state": "clean", + "coverage_state": "covered", "end": 28, - "start": 28 + "start": 27 }, { - "coverage_state": "covered", - "end": 30, + "coverage_state": "clean", + "end": 29, "start": 29 }, + { + "coverage_state": "covered", + "end": 31, + "start": 30 + }, { "coverage_state": "clean", - "end": 32, - "start": 31 + "end": 33, + "start": 32 }, { "coverage_state": "covered", - "end": 33, - "start": 33 - }, - { - "coverage_state": "clean", - "end": 35, + "end": 34, "start": 34 }, { - "coverage_state": "covered", + "coverage_state": "clean", "end": 36, - "start": 36 + "start": 35 }, { - "coverage_state": "clean", - "end": 39, + "coverage_state": "covered", + "end": 37, "start": 37 }, + { + "coverage_state": "clean", + "end": 40, + "start": 38 + }, { "coverage_state": "covered", - "end": 41, - "start": 40 + "end": 63, + "start": 41 }, { "coverage_state": "clean", - "end": 42, - "start": 42 + "end": 65, + "start": 64 }, { "coverage_state": "covered", - "end": 48, - "start": 43 + "end": 68, + "start": 66 }, { "coverage_state": "clean", - "end": 49, - "start": 49 + "end": 69, + "start": 69 }, { "coverage_state": "covered", - "end": 50, - "start": 50 + "end": 70, + "start": 70 + }, + { + "coverage_state": "clean", + "end": 71, + "start": 71 + }, + { + "coverage_state": "covered", + "end": 77, + "start": 72 + }, + { + "coverage_state": "clean", + "end": 78, + "start": 78 + }, + { + "coverage_state": "covered", + "end": 79, + "start": 79 + }, + { + "coverage_state": "clean", + "end": 81, + "start": 80 + }, + { + "coverage_state": "covered", + "end": 87, + "start": 82 + }, + { + "coverage_state": "clean", + "end": 88, + "start": 88 + }, + { + "coverage_state": "covered", + "end": 93, + "start": 89 + }, + { + "coverage_state": "clean", + "end": 95, + "start": 94 + }, + { + "coverage_state": "covered", + "end": 99, + "start": 96 + }, + { + "coverage_state": "clean", + "end": 100, + "start": 100 + }, + { + "coverage_state": "covered", + "end": 101, + "start": 101 + }, + { + "coverage_state": "clean", + "end": 102, + "start": 102 + }, + { + "coverage_state": "covered", + "end": 104, + "start": 103 + }, + { + "coverage_state": "clean", + "end": 105, + "start": 105 + }, + { + "coverage_state": "covered", + "end": 109, + "start": 106 + }, + { + "coverage_state": "clean", + "end": 110, + "start": 110 + }, + { + "coverage_state": "covered", + "end": 114, + "start": 111 + }, + { + "coverage_state": "clean", + "end": 115, + "start": 115 + }, + { + "coverage_state": "covered", + "end": 120, + "start": 116 + }, + { + "coverage_state": "clean", + "end": 121, + "start": 121 + }, + { + "coverage_state": "covered", + "end": 125, + "start": 122 + }, + { + "coverage_state": "clean", + "end": 126, + "start": 126 + }, + { + "coverage_state": "covered", + "end": 131, + "start": 127 + }, + { + "coverage_state": "clean", + "end": 132, + "start": 132 + }, + { + "coverage_state": "covered", + "end": 136, + "start": 133 + }, + { + "coverage_state": "clean", + "end": 137, + "start": 137 + }, + { + "coverage_state": "covered", + "end": 143, + "start": 138 + }, + { + "coverage_state": "clean", + "end": 144, + "start": 144 + }, + { + "coverage_state": "covered", + "end": 149, + "start": 145 + }, + { + "coverage_state": "clean", + "end": 150, + "start": 150 + }, + { + "coverage_state": "covered", + "end": 152, + "start": 151 + }, + { + "coverage_state": "clean", + "end": 153, + "start": 153 + }, + { + "coverage_state": "covered", + "end": 154, + "start": 154 + }, + { + "coverage_state": "partially-covered", + "end": 155, + "start": 155 + }, + { + "coverage_state": "covered", + "end": 156, + "start": 156 + }, + { + "coverage_state": "clean", + "end": 157, + "start": 157 + }, + { + "coverage_state": "uncovered", + "end": 158, + "start": 158 + }, + { + "coverage_state": "clean", + "end": 159, + "start": 159 + }, + { + "coverage_state": "covered", + "end": 162, + "start": 160 + }, + { + "coverage_state": "clean", + "end": 164, + "start": 163 + }, + { + "coverage_state": "covered", + "end": 168, + "start": 165 + }, + { + "coverage_state": "clean", + "end": 169, + "start": 169 + }, + { + "coverage_state": "covered", + "end": 170, + "start": 170 + }, + { + "coverage_state": "clean", + "end": 171, + "start": 171 + }, + { + "coverage_state": "covered", + "end": 174, + "start": 172 + }, + { + "coverage_state": "clean", + "end": 175, + "start": 175 + }, + { + "coverage_state": "covered", + "end": 176, + "start": 176 + }, + { + "coverage_state": "clean", + "end": 178, + "start": 177 + }, + { + "coverage_state": "covered", + "end": 179, + "start": 179 + }, + { + "coverage_state": "clean", + "end": 180, + "start": 180 + }, + { + "coverage_state": "covered", + "end": 190, + "start": 181 + }, + { + "coverage_state": "clean", + "end": 191, + "start": 191 + }, + { + "coverage_state": "covered", + "end": 193, + "start": 192 + }, + { + "coverage_state": "clean", + "end": 194, + "start": 194 + }, + { + "coverage_state": "covered", + "end": 196, + "start": 195 + }, + { + "coverage_state": "clean", + "end": 197, + "start": 197 + }, + { + "coverage_state": "covered", + "end": 198, + "start": 198 }, { "coverage_state": "clean", "end": null, - "start": 51 + "start": 199 } ], - "line_coverage": 100.0, + "line_coverage": 99.24, "name": "media.__init__.py" }, { - "branch_coverage": 97.61999999999999, - "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media/metadata.py", + "branch_coverage": 96.43, + "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media/common.py", + "fragments": [ + { + "coverage_state": "covered", + "end": 1, + "start": 1 + }, + { + "coverage_state": "clean", + "end": 2, + "start": 2 + }, + { + "coverage_state": "covered", + "end": 5, + "start": 3 + }, + { + "coverage_state": "clean", + "end": 6, + "start": 6 + }, + { + "coverage_state": "covered", + "end": 9, + "start": 7 + }, + { + "coverage_state": "clean", + "end": 11, + "start": 10 + }, + { + "coverage_state": "covered", + "end": 19, + "start": 12 + }, + { + "coverage_state": "clean", + "end": null, + "start": 20 + } + ], + "line_coverage": 100.0, + "name": "media.common.py" + }, + { + "branch_coverage": 96.43, + "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media/convert.py", "fragments": [ { "coverage_state": "covered", @@ -123,48 +461,121 @@ }, { "coverage_state": "covered", - "end": 9, + "end": 12, "start": 8 }, { "coverage_state": "clean", - "end": 10, + "end": 13, + "start": 13 + }, + { + "coverage_state": "covered", + "end": 18, + "start": 14 + }, + { + "coverage_state": "partially-covered", + "end": 19, + "start": 19 + }, + { + "coverage_state": "covered", + "end": 20, + "start": 20 + }, + { + "coverage_state": "clean", + "end": 21, + "start": 21 + }, + { + "coverage_state": "uncovered", + "end": 22, + "start": 22 + }, + { + "coverage_state": "covered", + "end": 24, + "start": 23 + }, + { + "coverage_state": "uncovered", + "end": 27, + "start": 25 + }, + { + "coverage_state": "covered", + "end": 33, + "start": 28 + }, + { + "coverage_state": "clean", + "end": 34, + "start": 34 + }, + { + "coverage_state": "covered", + "end": 35, + "start": 35 + }, + { + "coverage_state": "clean", + "end": null, + "start": 36 + } + ], + "line_coverage": 86.67, + "name": "media.convert.py" + }, + { + "branch_coverage": 96.43, + "filepath": "/user_data/data/dirk/prj/unittest/media/pylibs/media/metadata.py", + "fragments": [ + { + "coverage_state": "covered", + "end": 6, + "start": 1 + }, + { + "coverage_state": "clean", + "end": 8, + "start": 7 + }, + { + "coverage_state": "covered", + "end": 9, + "start": 9 + }, + { + "coverage_state": "clean", + "end": 11, "start": 10 }, { "coverage_state": "covered", "end": 13, - "start": 11 + "start": 12 }, { "coverage_state": "clean", - "end": 14, + "end": 15, "start": 14 }, { "coverage_state": "covered", - "end": 17, - "start": 15 + "end": 32, + "start": 16 }, { "coverage_state": "clean", - "end": 18, - "start": 18 - }, - { - "coverage_state": "covered", - "end": 41, - "start": 19 - }, - { - "coverage_state": "clean", - "end": 42, - "start": 42 + "end": 34, + "start": 33 }, { "coverage_state": "covered", "end": 44, - "start": 43 + "start": 35 }, { "coverage_state": "clean", @@ -173,291 +584,267 @@ }, { "coverage_state": "covered", - "end": 54, + "end": 48, "start": 47 }, { "coverage_state": "clean", - "end": 56, - "start": 55 + "end": 50, + "start": 49 }, { "coverage_state": "covered", - "end": 73, - "start": 57 + "end": 52, + "start": 51 }, { "coverage_state": "clean", - "end": 75, + "end": 53, + "start": 53 + }, + { + "coverage_state": "covered", + "end": 57, + "start": 54 + }, + { + "coverage_state": "clean", + "end": 58, + "start": 58 + }, + { + "coverage_state": "covered", + "end": 61, + "start": 59 + }, + { + "coverage_state": "clean", + "end": 62, + "start": 62 + }, + { + "coverage_state": "covered", + "end": 64, + "start": 63 + }, + { + "coverage_state": "clean", + "end": 65, + "start": 65 + }, + { + "coverage_state": "covered", + "end": 67, + "start": 66 + }, + { + "coverage_state": "clean", + "end": 68, + "start": 68 + }, + { + "coverage_state": "covered", + "end": 71, + "start": 69 + }, + { + "coverage_state": "clean", + "end": 73, + "start": 72 + }, + { + "coverage_state": "covered", + "end": 76, "start": 74 }, + { + "coverage_state": "clean", + "end": 77, + "start": 77 + }, + { + "coverage_state": "covered", + "end": 79, + "start": 78 + }, + { + "coverage_state": "clean", + "end": 80, + "start": 80 + }, { "coverage_state": "covered", "end": 85, - "start": 76 + "start": 81 }, { - "coverage_state": "clean", - "end": 87, + "coverage_state": "uncovered", + "end": 88, "start": 86 }, { - "coverage_state": "covered", + "coverage_state": "clean", "end": 89, - "start": 88 + "start": 89 }, { - "coverage_state": "clean", - "end": 91, + "coverage_state": "covered", + "end": 95, "start": 90 }, - { - "coverage_state": "covered", - "end": 93, - "start": 92 - }, { "coverage_state": "clean", - "end": 94, - "start": 94 + "end": 96, + "start": 96 }, { "coverage_state": "covered", - "end": 98, - "start": 95 - }, - { - "coverage_state": "clean", - "end": 99, - "start": 99 - }, - { - "coverage_state": "covered", - "end": 102, - "start": 100 - }, - { - "coverage_state": "clean", "end": 103, - "start": 103 + "start": 97 }, { - "coverage_state": "covered", + "coverage_state": "clean", "end": 105, "start": 104 }, { - "coverage_state": "clean", - "end": 106, + "coverage_state": "covered", + "end": 112, "start": 106 }, - { - "coverage_state": "covered", - "end": 108, - "start": 107 - }, { "coverage_state": "clean", - "end": 109, - "start": 109 - }, - { - "coverage_state": "covered", - "end": 112, - "start": 110 - }, - { - "coverage_state": "clean", - "end": 114, + "end": 113, "start": 113 }, { "coverage_state": "covered", - "end": 117, + "end": 114, + "start": 114 + }, + { + "coverage_state": "clean", + "end": 115, "start": 115 }, + { + "coverage_state": "covered", + "end": 135, + "start": 116 + }, { "coverage_state": "clean", - "end": 118, - "start": 118 + "end": 138, + "start": 136 }, { "coverage_state": "covered", - "end": 120, - "start": 119 + "end": 141, + "start": 139 }, { "coverage_state": "clean", - "end": 121, - "start": 121 - }, - { - "coverage_state": "covered", - "end": 126, - "start": 122 - }, - { - "coverage_state": "uncovered", - "end": 129, - "start": 127 - }, - { - "coverage_state": "clean", - "end": 130, - "start": 130 - }, - { - "coverage_state": "covered", - "end": 136, - "start": 131 - }, - { - "coverage_state": "clean", - "end": 137, - "start": 137 - }, - { - "coverage_state": "covered", - "end": 144, - "start": 138 - }, - { - "coverage_state": "clean", - "end": 146, - "start": 145 + "end": 143, + "start": 142 }, { "coverage_state": "covered", "end": 153, - "start": 147 + "start": 144 }, { "coverage_state": "clean", - "end": 154, + "end": 155, "start": 154 }, { "coverage_state": "covered", - "end": 155, - "start": 155 - }, - { - "coverage_state": "clean", - "end": 156, + "end": 157, "start": 156 }, - { - "coverage_state": "covered", - "end": 176, - "start": 157 - }, { "coverage_state": "clean", - "end": 179, - "start": 177 + "end": 169, + "start": 158 }, { "coverage_state": "covered", - "end": 182, - "start": 180 + "end": 171, + "start": 170 }, { "coverage_state": "clean", - "end": 184, - "start": 183 + "end": 187, + "start": 172 }, { "coverage_state": "covered", - "end": 194, - "start": 185 - }, - { - "coverage_state": "clean", "end": 196, - "start": 195 + "start": 188 }, { - "coverage_state": "covered", + "coverage_state": "clean", "end": 198, "start": 197 }, { - "coverage_state": "clean", - "end": 210, + "coverage_state": "covered", + "end": 201, "start": 199 }, - { - "coverage_state": "covered", - "end": 212, - "start": 211 - }, { "coverage_state": "clean", - "end": 228, - "start": 213 + "end": 203, + "start": 202 }, { "coverage_state": "covered", - "end": 237, - "start": 229 - }, - { - "coverage_state": "clean", - "end": 239, - "start": 238 - }, - { - "coverage_state": "covered", - "end": 242, - "start": 240 - }, - { - "coverage_state": "clean", - "end": 244, - "start": 243 - }, - { - "coverage_state": "covered", - "end": 255, - "start": 245 + "end": 214, + "start": 204 }, { "coverage_state": "partially-covered", - "end": 256, - "start": 256 + "end": 215, + "start": 215 }, { "coverage_state": "covered", - "end": 259, - "start": 257 + "end": 218, + "start": 216 }, { "coverage_state": "clean", - "end": 261, - "start": 260 + "end": 220, + "start": 219 }, { "coverage_state": "covered", - "end": 265, - "start": 262 + "end": 224, + "start": 221 }, { "coverage_state": "clean", "end": null, - "start": 266 + "start": 225 } ], - "line_coverage": 98.45, + "line_coverage": 98.08, "name": "media.metadata.py" } ], - "line_coverage": 98.57000000000001, + "line_coverage": 97.59, "name": "media" } ], "lost_souls": { "item_list": [], - "testcase_list": [] + "testcase_list": [ + "Initialisation", + "Join", + "Resize", + "Rotate", + "Save" + ] }, "specification": { "comment": "Comment", @@ -503,7 +890,7 @@ "Name": "media", "State": "Released", "Supported Interpreters": "python3", - "Version": "4111f284029e0f53b0411b6897f59d2b" + "Version": "d4bf62e70e70b47431f7471f25637ecf" }, "testrun_list": [ { @@ -515,8 +902,8 @@ "name": "Default Testsession name", "number_of_failed_tests": 0, "number_of_possibly_failed_tests": 0, - "number_of_successfull_tests": 1, - "number_of_tests": 1, + "number_of_successfull_tests": 6, + "number_of_tests": 6, "testcase_execution_level": 90, "testcase_names": { "0": "Single Test", @@ -525,27 +912,3399 @@ "90": "Full Test (all defined tests)" }, "testcases": { - "_XzMFcHYZEem_kd-7nxt1sg": { + "Initialisation": { "args": null, - "asctime": "2020-01-31 08:10:17,049", - "created": 1580454617.0494206, + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5836282, "exc_info": null, "exc_text": null, "filename": "__init__.py", "funcName": "testrun", "levelname": "INFO", "levelno": 20, - "lineno": 20, + "lineno": 30, + "message": "Initialisation", + "module": "__init__", + "moduleLogger": [], + "msecs": 583.6281776428223, + "msg": "Initialisation", + "name": "__tLogger__", + "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 571.4917182922363, + "stack_info": null, + "testcaseLogger": [ + { + "args": [ + "", + "" + ], + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5838015, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Type of image stored in instance is correct (Content and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5837142, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Type of image stored in instance): ()", + "module": "test", + "msecs": 583.7142467498779, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 571.577787399292, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.583761, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Type of image stored in instance): result = ()", + "module": "test", + "msecs": 583.7609767913818, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 571.6245174407959, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 583.8015079498291, + "msg": "Type of image stored in instance is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 571.6650485992432, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.0531158447265625e-05 + }, + { + "args": [ + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.584616, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Type of image stored in instance is correct (Content and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5844684, + "exc_info": null, + "exc_text": null, + "filename": "convert.py", + "funcName": "get_pil_image", + "levelname": "WARNING", + "levelno": 30, + "lineno": 35, + "message": "Instance type is not supported: ", + "module": "convert", + "msecs": 584.4683647155762, + "msg": "Instance type is not supported: ", + "name": "MEDIA", + "pathname": "src/media/convert.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.3319053649902, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5845308, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Type of image stored in instance): ()", + "module": "test", + "msecs": 584.5308303833008, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.3943710327148, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5845745, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Type of image stored in instance): result = ()", + "module": "test", + "msecs": 584.5744609832764, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.4380016326904, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 584.61594581604, + "msg": "Type of image stored in instance is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.4794864654541, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.1484832763671875e-05 + }, + { + "args": [ + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5848744, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Type of image stored in instance is correct (Content and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "/user_data/data/dirk/prj/unittest/media/unittest/input_data/unknown.txt" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5847173, + "exc_info": null, + "exc_text": null, + "filename": "convert.py", + "funcName": "get_pil_image", + "levelname": "WARNING", + "levelno": 30, + "lineno": 31, + "message": "Filetype is not supported (/user_data/data/dirk/prj/unittest/media/unittest/input_data/unknown.txt)", + "module": "convert", + "msecs": 584.7172737121582, + "msg": "Filetype is not supported (%s)", + "name": "MEDIA", + "pathname": "src/media/convert.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.5808143615723, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.5847898, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Type of image stored in instance): ()", + "module": "test", + "msecs": 584.7897529602051, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.6532936096191, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,584", + "created": 1580584170.584838, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Type of image stored in instance): result = ()", + "module": "test", + "msecs": 584.8379135131836, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.7014541625977, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 584.8743915557861, + "msg": "Type of image stored in instance is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 572.7379322052002, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 3.647804260253906e-05 + }, + { + "args": [ + "", + "" + ], + "asctime": "2020-02-01 20:09:30,694", + "created": 1580584170.6949663, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Type of image stored in instance is correct (Content and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,694", + "created": 1580584170.6947854, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Type of image stored in instance): ()", + "module": "test", + "msecs": 694.7853565216064, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 682.6488971710205, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,694", + "created": 1580584170.694898, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Type of image stored in instance): result = ()", + "module": "test", + "msecs": 694.8978900909424, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 682.7614307403564, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 694.9663162231445, + "msg": "Type of image stored in instance is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 682.8298568725586, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 6.842613220214844e-05 + }, + { + "args": [ + "", + "" + ], + "asctime": "2020-02-01 20:09:30,980", + "created": 1580584170.9809246, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Type of image stored in instance is correct (Content and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,980", + "created": 1580584170.9806376, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Type of image stored in instance): ()", + "module": "test", + "msecs": 980.6375503540039, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 968.501091003418, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Type of image stored in instance", + "", + "" + ], + "asctime": "2020-02-01 20:09:30,980", + "created": 1580584170.9808495, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Type of image stored in instance): result = ()", + "module": "test", + "msecs": 980.8495044708252, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 968.7130451202393, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 980.9246063232422, + "msg": "Type of image stored in instance is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 968.7881469726562, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 7.510185241699219e-05 + } + ], + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 0.3972964286804199, + "time_finished": "2020-02-01 20:09:30,980", + "time_start": "2020-02-01 20:09:30,583" + }, + "Join": { + "args": null, + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.061742, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "testrun", + "levelname": "INFO", + "levelno": 20, + "lineno": 34, + "message": "Join", + "module": "__init__", + "moduleLogger": [], + "msecs": 61.74206733703613, + "msg": "Join", + "name": "__tLogger__", + "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.60560798645, + "stack_info": null, + "testcaseLogger": [ + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.061956, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of join method without loading an image is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.0618377, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "WARNING", + "levelno": 30, + "lineno": 161, + "message": "No image available, joining not possible", + "module": "__init__", + "msecs": 61.83767318725586, + "msg": "No image available, joining not possible", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.70121383667, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method without loading an image", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.0618815, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of join method without loading an image): False ()", + "module": "test", + "msecs": 61.88154220581055, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.7450828552246, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method without loading an image", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.0619197, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of join method without loading an image): result = False ()", + "module": "test", + "msecs": 61.9196891784668, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.783229827881, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 61.955928802490234, + "msg": "Returnvalue of join method without loading an image is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.8194694519043, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 3.62396240234375e-05 + }, + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,361", + "created": 1580584172.3616211, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of join method with invalid join position is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 17 + ], + "asctime": "2020-02-01 20:09:32,361", + "created": 1580584172.3613942, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "WARNING", + "levelno": 30, + "lineno": 192, + "message": "Join position value 17 is not supported", + "module": "__init__", + "msecs": 361.39416694641113, + "msg": "Join position value %s is not supported", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2349.257707595825, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method with invalid join position", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,361", + "created": 1580584172.361534, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of join method with invalid join position): False ()", + "module": "test", + "msecs": 361.53411865234375, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2349.397659301758, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method with invalid join position", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,361", + "created": 1580584172.3615794, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of join method with invalid join position): result = False ()", + "module": "test", + "msecs": 361.57941818237305, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2349.442958831787, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 361.6211414337158, + "msg": "Returnvalue of join method with invalid join position is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2349.48468208313, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.172325134277344e-05 + }, + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.4528487, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of join method with unknown join file is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.4526198, + "exc_info": null, + "exc_text": null, + "filename": "convert.py", + "funcName": "get_pil_image", + "levelname": "WARNING", + "levelno": 30, + "lineno": 35, + "message": "Instance type is not supported: ", + "module": "convert", + "msecs": 452.6197910308838, + "msg": "Instance type is not supported: ", + "name": "MEDIA", + "pathname": "src/media/convert.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.483331680298, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "None" + ], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.4527113, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "WARNING", + "levelno": 30, + "lineno": 167, + "message": "Image to be joined is not supported None", + "module": "__init__", + "msecs": 452.7113437652588, + "msg": "Image to be joined is not supported %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.574884414673, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method with unknown join file", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.4527707, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of join method with unknown join file): False ()", + "module": "test", + "msecs": 452.7707099914551, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.634250640869, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of join method with unknown join file", + "False", + "" + ], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.45281, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of join method with unknown join file): result = False ()", + "module": "test", + "msecs": 452.81004905700684, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.673589706421, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 452.8486728668213, + "msg": "Returnvalue of join method with unknown join file is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.7122135162354, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 3.8623809814453125e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,793", + "created": 1580584172.793418, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 3 + ], + "asctime": "2020-02-01 20:09:32,452", + "created": 1580584172.4529128, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 98, + "message": "Join with position 3", + "module": "test_image", + "msecs": 452.9128074645996, + "msg": "Join with position %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2440.7763481140137, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:32,644", + "created": 1580584172.6443245, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 644.324541091919, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2632.188081741333, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [], + "asctime": "2020-02-01 20:09:32,675", + "created": 1580584172.6753554, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 195, + "message": "Joining two images", + "module": "__init__", + "msecs": 675.3554344177246, + "msg": "Joining two images", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2663.2189750671387, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_3.jpg'" + ], + "asctime": "2020-02-01 20:09:32,725", + "created": 1580584172.7258537, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_3.jpg'", + "module": "__init__", + "msecs": 725.853681564331, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2713.717222213745, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,793", + "created": 1580584172.7932827, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 793.2827472686768, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2781.146287918091, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,793", + "created": 1580584172.7933729, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 793.3728694915771, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2781.236410140991, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 793.4179306030273, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2781.2814712524414, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.506111145019531e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,142", + "created": 1580584173.142833, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 4 + ], + "asctime": "2020-02-01 20:09:32,793", + "created": 1580584172.793484, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 98, + "message": "Join with position 4", + "module": "test_image", + "msecs": 793.4839725494385, + "msg": "Join with position %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2781.3475131988525, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:32,993", + "created": 1580584172.9933403, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 993.340253829956, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2981.20379447937, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [], + "asctime": "2020-02-01 20:09:33,024", + "created": 1580584173.0246189, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 195, + "message": "Joining two images", + "module": "__init__", + "msecs": 24.618864059448242, + "msg": "Joining two images", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3012.4824047088623, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_4.jpg'" + ], + "asctime": "2020-02-01 20:09:33,075", + "created": 1580584173.0753677, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_4.jpg'", + "module": "__init__", + "msecs": 75.36768913269043, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3063.2312297821045, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,142", + "created": 1580584173.1427, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 142.6999568939209, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3130.563497543335, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,142", + "created": 1580584173.142788, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 142.78793334960938, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3130.6514739990234, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 142.83299446105957, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3130.6965351104736, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.506111145019531e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,488", + "created": 1580584173.4889648, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 5 + ], + "asctime": "2020-02-01 20:09:33,142", + "created": 1580584173.1428988, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 98, + "message": "Join with position 5", + "module": "test_image", + "msecs": 142.8987979888916, + "msg": "Join with position %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3130.7623386383057, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:33,338", + "created": 1580584173.3383312, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 338.3312225341797, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3326.1947631835938, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [], + "asctime": "2020-02-01 20:09:33,369", + "created": 1580584173.3696501, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 195, + "message": "Joining two images", + "module": "__init__", + "msecs": 369.65012550354004, + "msg": "Joining two images", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3357.513666152954, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_5.jpg'" + ], + "asctime": "2020-02-01 20:09:33,420", + "created": 1580584173.4202309, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_5.jpg'", + "module": "__init__", + "msecs": 420.2308654785156, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3408.0944061279297, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,488", + "created": 1580584173.4888318, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 488.8317584991455, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3476.6952991485596, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,488", + "created": 1580584173.4889195, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 488.9194965362549, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3476.783037185669, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 488.9647960662842, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3476.8283367156982, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.5299530029296875e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,837", + "created": 1580584173.8376875, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 1 + ], + "asctime": "2020-02-01 20:09:33,489", + "created": 1580584173.4890332, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 98, + "message": "Join with position 1", + "module": "test_image", + "msecs": 489.0332221984863, + "msg": "Join with position %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3476.8967628479004, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:33,685", + "created": 1580584173.6854477, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 685.4476928710938, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3673.311233520508, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [], + "asctime": "2020-02-01 20:09:33,716", + "created": 1580584173.7166605, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 195, + "message": "Joining two images", + "module": "__init__", + "msecs": 716.6604995727539, + "msg": "Joining two images", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3704.524040222168, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_1.jpg'" + ], + "asctime": "2020-02-01 20:09:33,767", + "created": 1580584173.7675517, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_1.jpg'", + "module": "__init__", + "msecs": 767.5516605377197, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3755.415201187134, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,837", + "created": 1580584173.8375463, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 837.5463485717773, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3825.4098892211914, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:33,837", + "created": 1580584173.8376412, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 837.6412391662598, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3825.504779815674, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 837.6874923706055, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3825.5510330200195, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.6253204345703125e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:34,202", + "created": 1580584174.202088, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 2 + ], + "asctime": "2020-02-01 20:09:33,837", + "created": 1580584173.8377557, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 98, + "message": "Join with position 2", + "module": "test_image", + "msecs": 837.7556800842285, + "msg": "Join with position %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 3825.6192207336426, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:34,039", + "created": 1580584174.0395095, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 39.50953483581543, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4027.3730754852295, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [], + "asctime": "2020-02-01 20:09:34,077", + "created": 1580584174.0770307, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "join", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 195, + "message": "Joining two images", + "module": "__init__", + "msecs": 77.03065872192383, + "msg": "Joining two images", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4064.894199371338, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_2.jpg'" + ], + "asctime": "2020-02-01 20:09:34,134", + "created": 1580584174.1344082, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/joined_image_2.jpg'", + "module": "__init__", + "msecs": 134.40823554992676, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4122.271776199341, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:34,201", + "created": 1580584174.2019513, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 201.951265335083, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4189.814805984497, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:34,202", + "created": 1580584174.202042, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 202.0421028137207, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4189.905643463135, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 202.0881175994873, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 4189.951658248901, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.601478576660156e-05 + } + ], + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 2.140346050262451, + "time_finished": "2020-02-01 20:09:34,202", + "time_start": "2020-02-01 20:09:32,061" + }, + "Resize": { + "args": null, + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.2757187, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "testrun", + "levelname": "INFO", + "levelno": 20, + "lineno": 32, + "message": "Resize", + "module": "__init__", + "moduleLogger": [], + "msecs": 275.71868896484375, + "msg": "Resize", + "name": "__tLogger__", + "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.5822296142578, + "stack_info": null, + "testcaseLogger": [ + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,382", + "created": 1580584171.3824558, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of successful resize method is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 300 + ], + "asctime": "2020-02-01 20:09:31,379", + "created": 1580584171.3791893, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 127, + "message": "Resizing picture to max 300 pixel in whatever direction", + "module": "__init__", + "msecs": 379.18925285339355, + "msg": "Resizing picture to max %d pixel in whatever direction", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1367.0527935028076, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of successful resize method", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,382", + "created": 1580584171.3823195, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of successful resize method): True ()", + "module": "test", + "msecs": 382.31945037841797, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1370.182991027832, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of successful resize method", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,382", + "created": 1580584171.382399, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of successful resize method): result = True ()", + "module": "test", + "msecs": 382.3990821838379, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1370.262622833252, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 382.45582580566406, + "msg": "Returnvalue of successful resize method is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1370.3193664550781, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 5.6743621826171875e-05 + }, + { + "args": [ + "300", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3834875, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Resulution of resized image is correct (Content 300 and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/resized_image.jpg'" + ], + "asctime": "2020-02-01 20:09:31,382", + "created": 1580584171.3825338, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/resized_image.jpg'", + "module": "__init__", + "msecs": 382.5337886810303, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1370.3973293304443, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Resulution of resized image", + "300", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3833785, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Resulution of resized image): 300 ()", + "module": "test", + "msecs": 383.3785057067871, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.2420463562012, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Resulution of resized image", + "300", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3834407, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Resulution of resized image): result = 300 ()", + "module": "test", + "msecs": 383.4407329559326, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.3042736053467, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 383.4874629974365, + "msg": "Resulution of resized image is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.3510036468506, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.673004150390625e-05 + }, + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3837013, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of failed resize method is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3835638, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "resize", + "levelname": "WARNING", + "levelno": 30, + "lineno": 124, + "message": "No image available to be resized", + "module": "__init__", + "msecs": 383.563756942749, + "msg": "No image available to be resized", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.427297592163, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of failed resize method", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.383608, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of failed resize method): False ()", + "module": "test", + "msecs": 383.6081027984619, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.471643447876, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of failed resize method", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3836484, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of failed resize method): result = False ()", + "module": "test", + "msecs": 383.6483955383301, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.5119361877441, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 383.7013244628906, + "msg": "Returnvalue of failed resize method is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.5648651123047, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 5.2928924560546875e-05 + } + ], + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 0.10798263549804688, + "time_finished": "2020-02-01 20:09:31,383", + "time_start": "2020-02-01 20:09:31,275" + }, + "Rotate": { + "args": null, + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3838365, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "testrun", + "levelname": "INFO", + "levelno": 20, + "lineno": 33, + "message": "Rotate", + "module": "__init__", + "moduleLogger": [], + "msecs": 383.8365077972412, + "msg": "Rotate", + "name": "__tLogger__", + "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.7000484466553, + "stack_info": null, + "testcaseLogger": [ + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,384", + "created": 1580584171.3840265, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of rotate method without loading an image is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3839104, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "rotate_by_orientation", + "levelname": "WARNING", + "levelno": 30, + "lineno": 135, + "message": "No image available, rotation not possible", + "module": "__init__", + "msecs": 383.9104175567627, + "msg": "No image available, rotation not possible", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.7739582061768, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of rotate method without loading an image", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.383953, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of rotate method without loading an image): False ()", + "module": "test", + "msecs": 383.9530944824219, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.816635131836, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of rotate method without loading an image", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,383", + "created": 1580584171.3839903, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of rotate method without loading an image): result = False ()", + "module": "test", + "msecs": 383.9902877807617, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.8538284301758, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 384.02652740478516, + "msg": "Returnvalue of rotate method without loading an image is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1371.8900680541992, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 3.62396240234375e-05 + }, + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,491", + "created": 1580584171.4913478, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of rotate method with invalid orientation is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "17" + ], + "asctime": "2020-02-01 20:09:31,491", + "created": 1580584171.491096, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "rotate_by_orientation", + "levelname": "WARNING", + "levelno": 30, + "lineno": 145, + "message": "Orientation 17 unknown for rotation", + "module": "__init__", + "msecs": 491.09601974487305, + "msg": "Orientation %s unknown for rotation", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1478.959560394287, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of rotate method with invalid orientation", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,491", + "created": 1580584171.4912276, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of rotate method with invalid orientation): False ()", + "module": "test", + "msecs": 491.2276268005371, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1479.0911674499512, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of rotate method with invalid orientation", + "False", + "" + ], + "asctime": "2020-02-01 20:09:31,491", + "created": 1580584171.4912934, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of rotate method with invalid orientation): result = False ()", + "module": "test", + "msecs": 491.29343032836914, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1479.1569709777832, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 491.3477897644043, + "msg": "Returnvalue of rotate method with invalid orientation is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1479.2113304138184, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 5.435943603515625e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,679", + "created": 1580584171.679181, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 6 + ], + "asctime": "2020-02-01 20:09:31,491", + "created": 1580584171.4914298, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 74, + "message": "Rotate with orientation 6", + "module": "test_image", + "msecs": 491.42980575561523, + "msg": "Rotate with orientation %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1479.2933464050293, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 270 + ], + "asctime": "2020-02-01 20:09:31,590", + "created": 1580584171.5903833, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 147, + "message": "Rotating picture by 270\u00b0", + "module": "__init__", + "msecs": 590.3832912445068, + "msg": "Rotating picture by %d\u00b0", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1578.246831893921, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_6.jpg'" + ], + "asctime": "2020-02-01 20:09:31,606", + "created": 1580584171.60636, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_6.jpg'", + "module": "__init__", + "msecs": 606.3599586486816, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1594.2234992980957, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,679", + "created": 1580584171.6790442, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 679.044246673584, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1666.907787322998, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,679", + "created": 1580584171.6791317, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 679.1317462921143, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1666.9952869415283, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 679.1810989379883, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1667.0446395874023, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.935264587402344e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,878", + "created": 1580584171.878498, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 8 + ], + "asctime": "2020-02-01 20:09:31,679", + "created": 1580584171.6792483, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 74, + "message": "Rotate with orientation 8", + "module": "test_image", + "msecs": 679.2483329772949, + "msg": "Rotate with orientation %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1667.111873626709, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 90 + ], + "asctime": "2020-02-01 20:09:31,787", + "created": 1580584171.7878458, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 147, + "message": "Rotating picture by 90\u00b0", + "module": "__init__", + "msecs": 787.8458499908447, + "msg": "Rotating picture by %d\u00b0", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1775.7093906402588, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_8.jpg'" + ], + "asctime": "2020-02-01 20:09:31,804", + "created": 1580584171.8045137, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_8.jpg'", + "module": "__init__", + "msecs": 804.513692855835, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1792.377233505249, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,878", + "created": 1580584171.8783646, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 878.3645629882812, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1866.2281036376953, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,878", + "created": 1580584171.8784525, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 878.4525394439697, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1866.3160800933838, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 878.4980773925781, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1866.3616180419922, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.553794860839844e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.061612, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Filecompare is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + 3 + ], + "asctime": "2020-02-01 20:09:31,878", + "created": 1580584171.8785644, + "exc_info": null, + "exc_text": null, + "filename": "test_image.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 74, + "message": "Rotate with orientation 3", + "module": "test_image", + "msecs": 878.5643577575684, + "msg": "Rotate with orientation %d", + "name": "__unittest__", + "pathname": "src/tests/test_image.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1866.4278984069824, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + 180 + ], + "asctime": "2020-02-01 20:09:31,985", + "created": 1580584171.985017, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "rotate_by_orientation", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 147, + "message": "Rotating picture by 180\u00b0", + "module": "__init__", + "msecs": 985.0170612335205, + "msg": "Rotating picture by %d\u00b0", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1972.8806018829346, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_3.jpg'" + ], + "asctime": "2020-02-01 20:09:31,995", + "created": 1580584171.995571, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/rotated_image_3.jpg'", + "module": "__init__", + "msecs": 995.5708980560303, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1983.4344387054443, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.0614767, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Filecompare): True ()", + "module": "test", + "msecs": 61.476707458496094, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.34024810791, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Filecompare", + "True", + "" + ], + "asctime": "2020-02-01 20:09:32,061", + "created": 1580584172.0615652, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Filecompare): result = True ()", + "module": "test", + "msecs": 61.56516075134277, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.428701400757, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 61.61189079284668, + "msg": "Filecompare is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 2049.4754314422607, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.673004150390625e-05 + } + ], + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 0.6777753829956055, + "time_finished": "2020-02-01 20:09:32,061", + "time_start": "2020-02-01 20:09:31,383" + }, + "Save": { + "args": null, + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.9811358, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "testrun", + "levelname": "INFO", + "levelno": 20, + "lineno": 31, + "message": "Save", + "module": "__init__", + "moduleLogger": [], + "msecs": 981.1358451843262, + "msg": "Save", + "name": "__tLogger__", + "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 968.9993858337402, + "stack_info": null, + "testcaseLogger": [ + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.981393, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of failed save method is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/saved_image.jpg'" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.9812298, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "WARNING", + "levelno": 30, + "lineno": 113, + "message": "No image available to be saved ('/user_data/data/dirk/prj/unittest/media/unittest/output_data/saved_image.jpg')", + "module": "__init__", + "msecs": 981.2297821044922, + "msg": "No image available to be saved (%s)", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.0933227539062, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of failed save method", + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.9813104, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of failed save method): False ()", + "module": "test", + "msecs": 981.3103675842285, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.1739082336426, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of failed save method", + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.9813523, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of failed save method): result = False ()", + "module": "test", + "msecs": 981.3523292541504, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.2158699035645, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 981.3930988311768, + "msg": "Returnvalue of failed save method is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.2566394805908, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.076957702636719e-05 + }, + { + "args": [ + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.981556, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Existance of saved file is correct (Content False and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "Existance of saved file", + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.9814758, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Existance of saved file): False ()", + "module": "test", + "msecs": 981.475830078125, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.3393707275391, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Existance of saved file", + "False", + "" + ], + "asctime": "2020-02-01 20:09:30,981", + "created": 1580584170.981516, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Existance of saved file): result = False ()", + "module": "test", + "msecs": 981.5158843994141, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.3794250488281, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 981.5559387207031, + "msg": "Existance of saved file is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 969.4194793701172, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 4.00543212890625e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.2753813, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Returnvalue of successful save method is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "'/user_data/data/dirk/prj/unittest/media/unittest/output_data/saved_image.jpg'" + ], + "asctime": "2020-02-01 20:09:31,260", + "created": 1580584171.2609422, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "save", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 116, + "message": "Saving image to '/user_data/data/dirk/prj/unittest/media/unittest/output_data/saved_image.jpg'", + "module": "__init__", + "msecs": 260.9422206878662, + "msg": "Saving image to %s", + "name": "MEDIA", + "pathname": "src/media/__init__.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1248.8057613372803, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of successful save method", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.2751992, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Returnvalue of successful save method): True ()", + "module": "test", + "msecs": 275.19917488098145, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.0627155303955, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Returnvalue of successful save method", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.275312, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Returnvalue of successful save method): result = True ()", + "module": "test", + "msecs": 275.3119468688965, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.1754875183105, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 275.38132667541504, + "msg": "Returnvalue of successful save method is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.244867324829, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 6.937980651855469e-05 + }, + { + "args": [ + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.2755928, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "equivalency_chk", + "levelname": "INFO", + "levelno": 20, + "lineno": 142, + "message": "Existance of saved file is correct (Content True and Type is ).", + "module": "test", + "moduleLogger": [ + { + "args": [ + "Existance of saved file", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.2755146, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_result__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 22, + "message": "Result (Existance of saved file): True ()", + "module": "test", + "msecs": 275.5146026611328, + "msg": "Result (%s): %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.3781433105469, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + }, + { + "args": [ + "Existance of saved file", + "True", + "" + ], + "asctime": "2020-02-01 20:09:31,275", + "created": 1580584171.275556, + "exc_info": null, + "exc_text": null, + "filename": "test.py", + "funcName": "__report_expectation_equivalency__", + "levelname": "DEBUG", + "levelno": 10, + "lineno": 26, + "message": "Expectation (Existance of saved file): result = True ()", + "module": "test", + "msecs": 275.5560874938965, + "msg": "Expectation (%s): result = %s (%s)", + "name": "__unittest__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.4196281433105, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread" + } + ], + "msecs": 275.5928039550781, + "msg": "Existance of saved file is correct (Content %s and Type is %s).", + "name": "__tLogger__", + "pathname": "src/unittest/test.py", + "process": 16493, + "processName": "MainProcess", + "relativeCreated": 1263.4563446044922, + "stack_info": null, + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 3.6716461181640625e-05 + } + ], + "thread": 140094293296960, + "threadName": "MainThread", + "time_consumption": 0.29445695877075195, + "time_finished": "2020-02-01 20:09:31,275", + "time_start": "2020-02-01 20:09:30,981" + }, + "_XzMFcHYZEem_kd-7nxt1sg": { + "args": null, + "asctime": "2020-02-01 20:09:30,073", + "created": 1580584170.0731459, + "exc_info": null, + "exc_text": null, + "filename": "__init__.py", + "funcName": "testrun", + "levelname": "INFO", + "levelno": 20, + "lineno": 26, "message": "_XzMFcHYZEem_kd-7nxt1sg", "module": "__init__", "moduleLogger": [], - "msecs": 49.42059516906738, + "msecs": 73.14586639404297, "msg": "_XzMFcHYZEem_kd-7nxt1sg", "name": "__tLogger__", "pathname": "/user_data/data/dirk/prj/unittest/media/unittest/src/tests/__init__.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 57.75260925292969, + "relativeCreated": 61.00940704345703, "stack_info": null, "testcaseLogger": [ { @@ -553,8 +4312,8 @@ "None", "" ], - "asctime": "2020-01-31 08:10:17,049", - "created": 1580454617.0499136, + "asctime": "2020-02-01 20:09:30,074", + "created": 1580584170.0742931, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -569,26 +4328,26 @@ "args": [ "/user_data/data/dirk/prj/unittest/media/unittest/input_data/unknown.txt" ], - "asctime": "2020-01-31 08:10:17,049", - "created": 1580454617.0495975, + "asctime": "2020-02-01 20:09:30,073", + "created": 1580584170.0739384, "exc_info": null, "exc_text": null, "filename": "__init__.py", "funcName": "get_media_data", "levelname": "WARNING", "levelno": 30, - "lineno": 50, + "lineno": 79, "message": "Filetype not known: /user_data/data/dirk/prj/unittest/media/unittest/input_data/unknown.txt", "module": "__init__", - "msecs": 49.59750175476074, + "msecs": 73.93836975097656, "msg": "Filetype not known: %s", "name": "MEDIA", "pathname": "src/media/__init__.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 57.92951583862305, + "relativeCreated": 61.801910400390625, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -597,8 +4356,8 @@ "None", "" ], - "asctime": "2020-01-31 08:10:17,049", - "created": 1580454617.0498288, + "asctime": "2020-02-01 20:09:30,074", + "created": 1580584170.0742016, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -608,15 +4367,15 @@ "lineno": 22, "message": "Result (Media data for unknown.txt): None ()", "module": "test", - "msecs": 49.82876777648926, + "msecs": 74.20158386230469, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 58.16078186035156, + "relativeCreated": 62.06512451171875, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -625,8 +4384,8 @@ "None", "" ], - "asctime": "2020-01-31 08:10:17,049", - "created": 1580454617.0498722, + "asctime": "2020-02-01 20:09:30,074", + "created": 1580584170.0742497, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -636,37 +4395,37 @@ "lineno": 26, "message": "Expectation (Media data for unknown.txt): result = None ()", "module": "test", - "msecs": 49.87215995788574, + "msecs": 74.2497444152832, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 58.20417404174805, + "relativeCreated": 62.113285064697266, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 49.913644790649414, + "msecs": 74.29313659667969, "msg": "Media data for unknown.txt is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 58.24565887451172, + "relativeCreated": 62.15667724609375, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 4.1484832763671875e-05 + "time_consumption": 4.3392181396484375e-05 }, { "args": [ "{'duration': 236.094694, 'bitrate': 290743, 'artist': 'Kaleo', 'title': 'No Good', 'album': 'A/B', 'track': 1, 'genre': 'Rock', 'year': 2016, 'size': 8580366, 'time': 1451606398, 'tm_is_subst': True}", "" ], - "asctime": "2020-01-31 08:10:17,124", - "created": 1580454617.124815, + "asctime": "2020-02-01 20:09:30,135", + "created": 1580584170.135747, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -683,8 +4442,8 @@ "{ 'duration': 236.094694, 'bitrate': 290743, 'artist': 'Kaleo', 'title': 'No Good', 'album': 'A/B', 'track': 1, 'genre': 'Rock', 'year': 2016, 'size': 8580366, 'time': 1451606398, 'tm_is_subst': True }", "" ], - "asctime": "2020-01-31 08:10:17,124", - "created": 1580454617.1244764, + "asctime": "2020-02-01 20:09:30,135", + "created": 1580584170.135381, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -694,15 +4453,15 @@ "lineno": 22, "message": "Result (Media data for audio.mp3): { 'duration': 236.094694, 'bitrate': 290743, 'artist': 'Kaleo', 'title': 'No Good', 'album': 'A/B', 'track': 1, 'genre': 'Rock', 'year': 2016, 'size': 8580366, 'time': 1451606398, 'tm_is_subst': True } ()", "module": "test", - "msecs": 124.47643280029297, + "msecs": 135.38098335266113, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 132.80844688415527, + "relativeCreated": 123.2445240020752, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -711,8 +4470,8 @@ "{ 'duration': 236.094694, 'bitrate': 290743, 'artist': 'Kaleo', 'title': 'No Good', 'album': 'A/B', 'track': 1, 'genre': 'Rock', 'year': 2016, 'time': 1451606398, 'tm_is_subst': True, 'size': 8580366 }", "" ], - "asctime": "2020-01-31 08:10:17,124", - "created": 1580454617.124694, + "asctime": "2020-02-01 20:09:30,135", + "created": 1580584170.135619, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -722,37 +4481,37 @@ "lineno": 26, "message": "Expectation (Media data for audio.mp3): result = { 'duration': 236.094694, 'bitrate': 290743, 'artist': 'Kaleo', 'title': 'No Good', 'album': 'A/B', 'track': 1, 'genre': 'Rock', 'year': 2016, 'time': 1451606398, 'tm_is_subst': True, 'size': 8580366 } ()", "module": "test", - "msecs": 124.6941089630127, + "msecs": 135.6189250946045, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 133.026123046875, + "relativeCreated": 123.48246574401855, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 124.81498718261719, + "msecs": 135.74695587158203, "msg": "Media data for audio.mp3 is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 133.1470012664795, + "relativeCreated": 123.6104965209961, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00012087821960449219 + "time_consumption": 0.00012803077697753906 }, { "args": [ "{'duration': 281.991837, 'bitrate': 228298, 'title': 'Video Games (Album Version Remastered)', 'artist': 'Lana Del Rey', 'album': 'Born To Die', 'genre': 'Pop', 'track': 4, 'year': 2012, 'size': 8047290, 'time': 1325375995, 'tm_is_subst': True}", "" ], - "asctime": "2020-01-31 08:10:17,195", - "created": 1580454617.1954708, + "asctime": "2020-02-01 20:09:30,197", + "created": 1580584170.1979814, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -769,26 +4528,26 @@ "bitrate", "bitrate" ], - "asctime": "2020-01-31 08:10:17,194", - "created": 1580454617.1948514, + "asctime": "2020-02-01 20:09:30,197", + "created": 1580584170.1973727, "exc_info": null, "exc_text": null, "filename": "metadata.py", "funcName": "__get_xxprobe_data__", "levelname": "WARNING", "levelno": 30, - "lineno": 143, + "lineno": 102, "message": "Can't convert 'N/A' (bitrate) for bitrate", "module": "metadata", - "msecs": 194.85139846801758, + "msecs": 197.3726749420166, "msg": "Can't convert %s (%s) for %s", "name": "MEDIA", "pathname": "src/media/metadata.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 203.18341255187988, + "relativeCreated": 185.23621559143066, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -797,8 +4556,8 @@ "{ 'duration': 281.991837, 'bitrate': 228298, 'title': 'Video Games (Album Version Remastered)', 'artist': 'Lana Del Rey', 'album': 'Born To Die', 'genre': 'Pop', 'track': 4, 'year': 2012, 'size': 8047290, 'time': 1325375995, 'tm_is_subst': True }", "" ], - "asctime": "2020-01-31 08:10:17,195", - "created": 1580454617.1952865, + "asctime": "2020-02-01 20:09:30,197", + "created": 1580584170.1977887, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -808,15 +4567,15 @@ "lineno": 22, "message": "Result (Media data for audio_fail_conv.mp3): { 'duration': 281.991837, 'bitrate': 228298, 'title': 'Video Games (Album Version Remastered)', 'artist': 'Lana Del Rey', 'album': 'Born To Die', 'genre': 'Pop', 'track': 4, 'year': 2012, 'size': 8047290, 'time': 1325375995, 'tm_is_subst': True } ()", "module": "test", - "msecs": 195.28651237487793, + "msecs": 197.78871536254883, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 203.61852645874023, + "relativeCreated": 185.6522560119629, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -825,8 +4584,8 @@ "{ 'duration': 281.991837, 'bitrate': 228298, 'artist': 'Lana Del Rey', 'title': 'Video Games (Album Version Remastered)', 'album': 'Born To Die', 'track': 4, 'genre': 'Pop', 'year': 2012, 'time': 1325375995, 'tm_is_subst': True, 'size': 8047290 }", "" ], - "asctime": "2020-01-31 08:10:17,195", - "created": 1580454617.1953719, + "asctime": "2020-02-01 20:09:30,197", + "created": 1580584170.1978834, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -836,37 +4595,37 @@ "lineno": 26, "message": "Expectation (Media data for audio_fail_conv.mp3): result = { 'duration': 281.991837, 'bitrate': 228298, 'artist': 'Lana Del Rey', 'title': 'Video Games (Album Version Remastered)', 'album': 'Born To Die', 'track': 4, 'genre': 'Pop', 'year': 2012, 'time': 1325375995, 'tm_is_subst': True, 'size': 8047290 } ()", "module": "test", - "msecs": 195.3718662261963, + "msecs": 197.88336753845215, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 203.7038803100586, + "relativeCreated": 185.7469081878662, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 195.47080993652344, + "msecs": 197.9813575744629, "msg": "Media data for audio_fail_conv.mp3 is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 203.80282402038574, + "relativeCreated": 185.84489822387695, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 9.894371032714844e-05 + "time_consumption": 9.799003601074219e-05 }, { "args": [ "{'duration': 120.476735, 'bitrate': 240202, 'title': 'Was bringt der Dezember', 'artist': 'Rolf und seine Freunde', 'album': 'Wir warten auf Weihnachten', 'year': 0, 'track': 9, 'genre': 'Other', 'size': 3617354}", "" ], - "asctime": "2020-01-31 08:10:17,248", - "created": 1580454617.248586, + "asctime": "2020-02-01 20:09:30,250", + "created": 1580584170.250763, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -883,8 +4642,8 @@ "{ 'duration': 120.476735, 'bitrate': 240202, 'title': 'Was bringt der Dezember', 'artist': 'Rolf und seine Freunde', 'album': 'Wir warten auf Weihnachten', 'year': 0, 'track': 9, 'genre': 'Other', 'size': 3617354 }", "" ], - "asctime": "2020-01-31 08:10:17,248", - "created": 1580454617.2483046, + "asctime": "2020-02-01 20:09:30,250", + "created": 1580584170.2504418, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -894,15 +4653,15 @@ "lineno": 22, "message": "Result (Media data for audio_year_0.mp3): { 'duration': 120.476735, 'bitrate': 240202, 'title': 'Was bringt der Dezember', 'artist': 'Rolf und seine Freunde', 'album': 'Wir warten auf Weihnachten', 'year': 0, 'track': 9, 'genre': 'Other', 'size': 3617354 } ()", "module": "test", - "msecs": 248.3046054840088, + "msecs": 250.4417896270752, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 256.6366195678711, + "relativeCreated": 238.30533027648926, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -911,8 +4670,8 @@ "{ 'duration': 120.476735, 'bitrate': 240202, 'artist': 'Rolf und seine Freunde', 'title': 'Was bringt der Dezember', 'album': 'Wir warten auf Weihnachten', 'track': 9, 'genre': 'Other', 'year': 0, 'size': 3617354 }", "" ], - "asctime": "2020-01-31 08:10:17,248", - "created": 1580454617.24848, + "asctime": "2020-02-01 20:09:30,250", + "created": 1580584170.2506452, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -922,37 +4681,37 @@ "lineno": 26, "message": "Expectation (Media data for audio_year_0.mp3): result = { 'duration': 120.476735, 'bitrate': 240202, 'artist': 'Rolf und seine Freunde', 'title': 'Was bringt der Dezember', 'album': 'Wir warten auf Weihnachten', 'track': 9, 'genre': 'Other', 'year': 0, 'size': 3617354 } ()", "module": "test", - "msecs": 248.48008155822754, + "msecs": 250.64516067504883, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 256.81209564208984, + "relativeCreated": 238.5087013244629, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 248.58593940734863, + "msecs": 250.762939453125, "msg": "Media data for audio_year_0.mp3 is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 256.91795349121094, + "relativeCreated": 238.62648010253906, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00010585784912109375 + "time_consumption": 0.00011777877807617188 }, { "args": [ "{'time': 1518783213, 'exposure_program': 'Program Normal', 'exposure_time': 0.000535, 'flash': 'Auto Off', 'aperture': 2.2, 'focal_length': 4.5, 'gps': {'lon': 12.140646934444444, 'lat': 53.68635940527778}, 'height': 2240, 'iso': 50, 'orientation': 0, 'width': 3968, 'size': 4342955, 'camera': 'HUAWEI: EVA-L09'}", "" ], - "asctime": "2020-01-31 08:10:17,266", - "created": 1580454617.266195, + "asctime": "2020-02-01 20:09:30,268", + "created": 1580584170.2684343, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -969,8 +4728,8 @@ "{ 'time': 1518783213, 'exposure_program': 'Program Normal', 'exposure_time': 0.000535, 'flash': 'Auto Off', 'aperture': 2.2, 'focal_length': 4.5, 'gps': { 'lon': 12.140646934444444, 'lat': 53.68635940527778 }, 'height': 2240, 'iso': 50, 'orientation': 0, 'width': 3968, 'size': 4342955, 'camera': 'HUAWEI: EVA-L09' }", "" ], - "asctime": "2020-01-31 08:10:17,265", - "created": 1580454617.2659605, + "asctime": "2020-02-01 20:09:30,268", + "created": 1580584170.2682295, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -980,15 +4739,15 @@ "lineno": 22, "message": "Result (Media data for image_exif_gps.jpg): { 'time': 1518783213, 'exposure_program': 'Program Normal', 'exposure_time': 0.000535, 'flash': 'Auto Off', 'aperture': 2.2, 'focal_length': 4.5, 'gps': { 'lon': 12.140646934444444, 'lat': 53.68635940527778 }, 'height': 2240, 'iso': 50, 'orientation': 0, 'width': 3968, 'size': 4342955, 'camera': 'HUAWEI: EVA-L09' } ()", "module": "test", - "msecs": 265.9604549407959, + "msecs": 268.22948455810547, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 274.2924690246582, + "relativeCreated": 256.09302520751953, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -997,8 +4756,8 @@ "{ 'time': 1518783213, 'exposure_program': 'Program Normal', 'exposure_time': 0.000535, 'flash': 'Auto Off', 'aperture': 2.2, 'focal_length': 4.5, 'gps': { 'lon': 12.140646934444444, 'lat': 53.68635940527778 }, 'height': 2240, 'iso': 50, 'orientation': 0, 'width': 3968, 'camera': 'HUAWEI: EVA-L09', 'size': 4342955 }", "" ], - "asctime": "2020-01-31 08:10:17,266", - "created": 1580454617.2660656, + "asctime": "2020-02-01 20:09:30,268", + "created": 1580584170.2683337, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1008,37 +4767,37 @@ "lineno": 26, "message": "Expectation (Media data for image_exif_gps.jpg): result = { 'time': 1518783213, 'exposure_program': 'Program Normal', 'exposure_time': 0.000535, 'flash': 'Auto Off', 'aperture': 2.2, 'focal_length': 4.5, 'gps': { 'lon': 12.140646934444444, 'lat': 53.68635940527778 }, 'height': 2240, 'iso': 50, 'orientation': 0, 'width': 3968, 'camera': 'HUAWEI: EVA-L09', 'size': 4342955 } ()", "module": "test", - "msecs": 266.0655975341797, + "msecs": 268.33367347717285, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 274.397611618042, + "relativeCreated": 256.1972141265869, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 266.19505882263184, + "msecs": 268.4342861175537, "msg": "Media data for image_exif_gps.jpg is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 274.52707290649414, + "relativeCreated": 256.2978267669678, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00012946128845214844 + "time_consumption": 0.00010061264038085938 }, { "args": [ "{'time': 1515143529, 'exposure_program': 'Program Normal', 'exposure_time': 0.03, 'flash': 'Fired', 'aperture': 2.2, 'focal_length': 4.5, 'height': 3968, 'iso': 160, 'orientation': 0, 'width': 2976, 'size': 2837285, 'camera': 'HUAWEI: EVA-L09'}", "" ], - "asctime": "2020-01-31 08:10:17,269", - "created": 1580454617.26988, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.2721064, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1055,8 +4814,8 @@ "{ 'time': 1515143529, 'exposure_program': 'Program Normal', 'exposure_time': 0.03, 'flash': 'Fired', 'aperture': 2.2, 'focal_length': 4.5, 'height': 3968, 'iso': 160, 'orientation': 0, 'width': 2976, 'size': 2837285, 'camera': 'HUAWEI: EVA-L09' }", "" ], - "asctime": "2020-01-31 08:10:17,269", - "created": 1580454617.2697332, + "asctime": "2020-02-01 20:09:30,271", + "created": 1580584170.2719312, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1066,15 +4825,15 @@ "lineno": 22, "message": "Result (Media data for image_exif_no_gps.jpg): { 'time': 1515143529, 'exposure_program': 'Program Normal', 'exposure_time': 0.03, 'flash': 'Fired', 'aperture': 2.2, 'focal_length': 4.5, 'height': 3968, 'iso': 160, 'orientation': 0, 'width': 2976, 'size': 2837285, 'camera': 'HUAWEI: EVA-L09' } ()", "module": "test", - "msecs": 269.733190536499, + "msecs": 271.9311714172363, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.0652046203613, + "relativeCreated": 259.7947120666504, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1083,8 +4842,8 @@ "{ 'time': 1515143529, 'exposure_program': 'Program Normal', 'exposure_time': 0.03, 'flash': 'Fired', 'aperture': 2.2, 'focal_length': 4.5, 'height': 3968, 'iso': 160, 'orientation': 0, 'width': 2976, 'camera': 'HUAWEI: EVA-L09', 'size': 2837285 }", "" ], - "asctime": "2020-01-31 08:10:17,269", - "created": 1580454617.269806, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.272007, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1094,37 +4853,37 @@ "lineno": 26, "message": "Expectation (Media data for image_exif_no_gps.jpg): result = { 'time': 1515143529, 'exposure_program': 'Program Normal', 'exposure_time': 0.03, 'flash': 'Fired', 'aperture': 2.2, 'focal_length': 4.5, 'height': 3968, 'iso': 160, 'orientation': 0, 'width': 2976, 'camera': 'HUAWEI: EVA-L09', 'size': 2837285 } ()", "module": "test", - "msecs": 269.805908203125, + "msecs": 272.0069885253906, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.1379222869873, + "relativeCreated": 259.8705291748047, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 269.8800563812256, + "msecs": 272.106409072876, "msg": "Media data for image_exif_no_gps.jpg is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.2120704650879, + "relativeCreated": 259.96994972229004, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 7.414817810058594e-05 + "time_consumption": 9.942054748535156e-05 }, { "args": [ "{'size': 1139092, 'time': 1449870515, 'tm_is_subst': True}", "" ], - "asctime": "2020-01-31 08:10:17,270", - "created": 1580454617.2703028, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.2725182, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1139,26 +4898,26 @@ "args": [ "/user_data/data/dirk/prj/unittest/media/unittest/input_data/image_non_exif.jpg" ], - "asctime": "2020-01-31 08:10:17,270", - "created": 1580454617.2700617, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.272316, "exc_info": null, "exc_text": null, "filename": "metadata.py", "funcName": "__get_exif_data__", "levelname": "DEBUG", "levelno": 10, - "lineno": 153, + "lineno": 112, "message": "/user_data/data/dirk/prj/unittest/media/unittest/input_data/image_non_exif.jpg does not have any exif information", "module": "metadata", - "msecs": 270.061731338501, + "msecs": 272.31597900390625, "msg": "%s does not have any exif information", "name": "MEDIA", "pathname": "src/media/metadata.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.3937454223633, + "relativeCreated": 260.1795196533203, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1167,8 +4926,8 @@ "{ 'size': 1139092, 'time': 1449870515, 'tm_is_subst': True }", "" ], - "asctime": "2020-01-31 08:10:17,270", - "created": 1580454617.2701979, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.272417, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1178,15 +4937,15 @@ "lineno": 22, "message": "Result (Media data for image_non_exif.jpg): { 'size': 1139092, 'time': 1449870515, 'tm_is_subst': True } ()", "module": "test", - "msecs": 270.19786834716797, + "msecs": 272.4170684814453, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.5298824310303, + "relativeCreated": 260.2806091308594, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1195,8 +4954,8 @@ "{ 'time': 1449870515, 'tm_is_subst': True, 'size': 1139092 }", "" ], - "asctime": "2020-01-31 08:10:17,270", - "created": 1580454617.2702498, + "asctime": "2020-02-01 20:09:30,272", + "created": 1580584170.272466, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1206,37 +4965,37 @@ "lineno": 26, "message": "Expectation (Media data for image_non_exif.jpg): result = { 'time': 1449870515, 'tm_is_subst': True, 'size': 1139092 } ()", "module": "test", - "msecs": 270.2498435974121, + "msecs": 272.46594429016113, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.5818576812744, + "relativeCreated": 260.3294849395752, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 270.30277252197266, + "msecs": 272.5181579589844, "msg": "Media data for image_non_exif.jpg is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 278.63478660583496, + "relativeCreated": 260.38169860839844, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 5.2928924560546875e-05 + "time_consumption": 5.221366882324219e-05 }, { "args": [ "{'time': 1226149915, 'exposure_program': 'Program Normal', 'exposure_time': 0.008, 'flash': 'Fill Fired', 'aperture': 7.1, 'focal_length': 170.0, 'height': 2592, 'iso': 400, 'orientation': 1, 'width': 3888, 'size': 1301272, 'camera': 'Canon: Canon EOS 40D'}", "" ], - "asctime": "2020-01-31 08:10:17,274", - "created": 1580454617.2744613, + "asctime": "2020-02-01 20:09:30,277", + "created": 1580584170.2774484, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1251,26 +5010,26 @@ "args": [ "{0: b'\\x02\\x02\\x00\\x00'}" ], - "asctime": "2020-01-31 08:10:17,274", - "created": 1580454617.2741964, + "asctime": "2020-02-01 20:09:30,277", + "created": 1580584170.2771828, "exc_info": null, "exc_text": null, "filename": "metadata.py", "funcName": "__gps_conv__", "levelname": "WARNING", "levelno": 30, - "lineno": 259, + "lineno": 218, "message": "GPS data extraction failed for {0: b'\\x02\\x02\\x00\\x00'}", "module": "metadata", - "msecs": 274.1963863372803, + "msecs": 277.18281745910645, "msg": "GPS data extraction failed for %s", "name": "MEDIA", "pathname": "src/media/metadata.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 282.5284004211426, + "relativeCreated": 265.0463581085205, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1279,8 +5038,8 @@ "{ 'time': 1226149915, 'exposure_program': 'Program Normal', 'exposure_time': 0.008, 'flash': 'Fill Fired', 'aperture': 7.1, 'focal_length': 170.0, 'height': 2592, 'iso': 400, 'orientation': 1, 'width': 3888, 'size': 1301272, 'camera': 'Canon: Canon EOS 40D' }", "" ], - "asctime": "2020-01-31 08:10:17,274", - "created": 1580454617.2743208, + "asctime": "2020-02-01 20:09:30,277", + "created": 1580584170.2773113, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1290,15 +5049,15 @@ "lineno": 22, "message": "Result (Media data for image_extraction_failed.jpg): { 'time': 1226149915, 'exposure_program': 'Program Normal', 'exposure_time': 0.008, 'flash': 'Fill Fired', 'aperture': 7.1, 'focal_length': 170.0, 'height': 2592, 'iso': 400, 'orientation': 1, 'width': 3888, 'size': 1301272, 'camera': 'Canon: Canon EOS 40D' } ()", "module": "test", - "msecs": 274.3208408355713, + "msecs": 277.3113250732422, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 282.6528549194336, + "relativeCreated": 265.17486572265625, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1307,8 +5066,8 @@ "{ 'time': 1226149915, 'exposure_program': 'Program Normal', 'exposure_time': 0.008, 'flash': 'Fill Fired', 'aperture': 7.1, 'focal_length': 170.0, 'height': 2592, 'iso': 400, 'orientation': 1, 'width': 3888, 'camera': 'Canon: Canon EOS 40D', 'size': 1301272 }", "" ], - "asctime": "2020-01-31 08:10:17,274", - "created": 1580454617.2743845, + "asctime": "2020-02-01 20:09:30,277", + "created": 1580584170.277376, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1318,37 +5077,37 @@ "lineno": 26, "message": "Expectation (Media data for image_extraction_failed.jpg): result = { 'time': 1226149915, 'exposure_program': 'Program Normal', 'exposure_time': 0.008, 'flash': 'Fill Fired', 'aperture': 7.1, 'focal_length': 170.0, 'height': 2592, 'iso': 400, 'orientation': 1, 'width': 3888, 'camera': 'Canon: Canon EOS 40D', 'size': 1301272 } ()", "module": "test", - "msecs": 274.3844985961914, + "msecs": 277.3759365081787, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 282.7165126800537, + "relativeCreated": 265.2394771575928, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 274.4612693786621, + "msecs": 277.4484157562256, "msg": "Media data for image_extraction_failed.jpg is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 282.7932834625244, + "relativeCreated": 265.31195640563965, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 7.677078247070312e-05 + "time_consumption": 7.2479248046875e-05 }, { "args": [ "{'width': 800, 'height': 480, 'ratio': 1.6666666666666667, 'duration': 3.964, 'bitrate': 2341765, 'time': 1414948303, 'size': 1160345}", "" ], - "asctime": "2020-01-31 08:10:17,331", - "created": 1580454617.3313096, + "asctime": "2020-02-01 20:09:30,332", + "created": 1580584170.332206, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1365,8 +5124,8 @@ "{ 'width': 800, 'height': 480, 'ratio': 1.6666666666666667, 'duration': 3.964, 'bitrate': 2341765, 'time': 1414948303, 'size': 1160345 }", "" ], - "asctime": "2020-01-31 08:10:17,330", - "created": 1580454617.3309891, + "asctime": "2020-02-01 20:09:30,331", + "created": 1580584170.331899, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1376,15 +5135,15 @@ "lineno": 22, "message": "Result (Media data for video.3gp): { 'width': 800, 'height': 480, 'ratio': 1.6666666666666667, 'duration': 3.964, 'bitrate': 2341765, 'time': 1414948303, 'size': 1160345 } ()", "module": "test", - "msecs": 330.98912239074707, + "msecs": 331.89892768859863, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 339.3211364746094, + "relativeCreated": 319.7624683380127, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1393,8 +5152,8 @@ "{ 'width': 800, 'height': 480, 'ratio': 1.6666666666666667, 'duration': 3.964, 'bitrate': 2341765, 'time': 1414948303, 'size': 1160345 }", "" ], - "asctime": "2020-01-31 08:10:17,331", - "created": 1580454617.3312073, + "asctime": "2020-02-01 20:09:30,332", + "created": 1580584170.3320694, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1404,37 +5163,37 @@ "lineno": 26, "message": "Expectation (Media data for video.3gp): result = { 'width': 800, 'height': 480, 'ratio': 1.6666666666666667, 'duration': 3.964, 'bitrate': 2341765, 'time': 1414948303, 'size': 1160345 } ()", "module": "test", - "msecs": 331.207275390625, + "msecs": 332.06939697265625, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 339.5392894744873, + "relativeCreated": 319.9329376220703, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 331.30955696105957, + "msecs": 332.20601081848145, "msg": "Media data for video.3gp is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 339.6415710449219, + "relativeCreated": 320.0695514678955, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00010228157043457031 + "time_consumption": 0.0001366138458251953 }, { "args": [ "{'width': 1920, 'height': 1080, 'ratio': 1.7777777777777777, 'duration': 12.453, 'bitrate': 17883888, 'time': 1503125482, 'size': 27838508}", "" ], - "asctime": "2020-01-31 08:10:17,523", - "created": 1580454617.5236886, + "asctime": "2020-02-01 20:09:30,470", + "created": 1580584170.4703205, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1451,8 +5210,8 @@ "{ 'width': 1920, 'height': 1080, 'ratio': 1.7777777777777777, 'duration': 12.453, 'bitrate': 17883888, 'time': 1503125482, 'size': 27838508 }", "" ], - "asctime": "2020-01-31 08:10:17,523", - "created": 1580454617.5233953, + "asctime": "2020-02-01 20:09:30,470", + "created": 1580584170.4700418, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1462,15 +5221,15 @@ "lineno": 22, "message": "Result (Media data for video.mp4): { 'width': 1920, 'height': 1080, 'ratio': 1.7777777777777777, 'duration': 12.453, 'bitrate': 17883888, 'time': 1503125482, 'size': 27838508 } ()", "module": "test", - "msecs": 523.395299911499, + "msecs": 470.04175186157227, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 531.7273139953613, + "relativeCreated": 457.9052925109863, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1479,8 +5238,8 @@ "{ 'width': 1920, 'height': 1080, 'ratio': 1.7777777777777777, 'duration': 12.453, 'bitrate': 17883888, 'time': 1503125482, 'size': 27838508 }", "" ], - "asctime": "2020-01-31 08:10:17,523", - "created": 1580454617.5235822, + "asctime": "2020-02-01 20:09:30,470", + "created": 1580584170.4702196, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1490,37 +5249,37 @@ "lineno": 26, "message": "Expectation (Media data for video.mp4): result = { 'width': 1920, 'height': 1080, 'ratio': 1.7777777777777777, 'duration': 12.453, 'bitrate': 17883888, 'time': 1503125482, 'size': 27838508 } ()", "module": "test", - "msecs": 523.5822200775146, + "msecs": 470.21961212158203, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 531.914234161377, + "relativeCreated": 458.0831527709961, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 523.688554763794, + "msecs": 470.320463180542, "msg": "Media data for video.mp4 is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 532.0205688476562, + "relativeCreated": 458.18400382995605, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00010633468627929688 + "time_consumption": 0.00010085105895996094 }, { "args": [ "{'width': 320, 'height': 240, 'ratio': 0.0, 'duration': 26.531264, 'bitrate': 840554, 'time': 1086778620, 'size': 2787622}", "" ], - "asctime": "2020-01-31 08:10:17,577", - "created": 1580454617.5771666, + "asctime": "2020-02-01 20:09:30,527", + "created": 1580584170.527415, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1537,26 +5296,26 @@ "duration", "duration" ], - "asctime": "2020-01-31 08:10:17,576", - "created": 1580454617.5764694, + "asctime": "2020-02-01 20:09:30,526", + "created": 1580584170.5266123, "exc_info": null, "exc_text": null, "filename": "metadata.py", "funcName": "__get_xxprobe_data__", "levelname": "WARNING", "levelno": 30, - "lineno": 143, + "lineno": 102, "message": "Can't convert 'N/A' (duration) for duration", "module": "metadata", - "msecs": 576.4694213867188, + "msecs": 526.6122817993164, "msg": "Can't convert %s (%s) for %s", "name": "MEDIA", "pathname": "src/media/metadata.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 584.801435470581, + "relativeCreated": 514.4758224487305, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1565,8 +5324,8 @@ "{ 'width': 320, 'height': 240, 'ratio': 0.0, 'duration': 26.531264, 'bitrate': 840554, 'time': 1086778620, 'size': 2787622 }", "" ], - "asctime": "2020-01-31 08:10:17,576", - "created": 1580454617.5769684, + "asctime": "2020-02-01 20:09:30,527", + "created": 1580584170.5271964, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1576,15 +5335,15 @@ "lineno": 22, "message": "Result (Media data for video_special_time.avi): { 'width': 320, 'height': 240, 'ratio': 0.0, 'duration': 26.531264, 'bitrate': 840554, 'time': 1086778620, 'size': 2787622 } ()", "module": "test", - "msecs": 576.9684314727783, + "msecs": 527.1964073181152, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 585.3004455566406, + "relativeCreated": 515.0599479675293, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1593,8 +5352,8 @@ "{ 'width': 320, 'height': 240, 'ratio': 0.0, 'duration': 26.531264, 'bitrate': 840554, 'time': 1086778620, 'size': 2787622 }", "" ], - "asctime": "2020-01-31 08:10:17,577", - "created": 1580454617.5770667, + "asctime": "2020-02-01 20:09:30,527", + "created": 1580584170.5273075, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1604,37 +5363,37 @@ "lineno": 26, "message": "Expectation (Media data for video_special_time.avi): result = { 'width': 320, 'height': 240, 'ratio': 0.0, 'duration': 26.531264, 'bitrate': 840554, 'time': 1086778620, 'size': 2787622 } ()", "module": "test", - "msecs": 577.0666599273682, + "msecs": 527.3075103759766, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 585.3986740112305, + "relativeCreated": 515.1710510253906, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 577.1665573120117, + "msecs": 527.4150371551514, "msg": "Media data for video_special_time.avi is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 585.498571395874, + "relativeCreated": 515.2785778045654, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 9.989738464355469e-05 + "time_consumption": 0.00010752677917480469 }, { "args": [ "{'width': 640, 'height': 480, 'ratio': 1.3333333333333333, 'duration': 11.016, 'bitrate': 2153411, 'size': 2965248, 'time': 1158528375, 'tm_is_subst': True}", "" ], - "asctime": "2020-01-31 08:10:17,666", - "created": 1580454617.6665187, + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5833867, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1651,8 +5410,8 @@ "{ 'width': 640, 'height': 480, 'ratio': 1.3333333333333333, 'duration': 11.016, 'bitrate': 2153411, 'size': 2965248, 'time': 1158528375, 'tm_is_subst': True }", "" ], - "asctime": "2020-01-31 08:10:17,666", - "created": 1580454617.666085, + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5830886, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1662,15 +5421,15 @@ "lineno": 22, "message": "Result (Media data for video_no_date.avi): { 'width': 640, 'height': 480, 'ratio': 1.3333333333333333, 'duration': 11.016, 'bitrate': 2153411, 'size': 2965248, 'time': 1158528375, 'tm_is_subst': True } ()", "module": "test", - "msecs": 666.0850048065186, + "msecs": 583.0886363983154, "msg": "Result (%s): %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 674.4170188903809, + "relativeCreated": 570.9521770477295, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" }, { @@ -1679,8 +5438,8 @@ "{ 'width': 640, 'height': 480, 'ratio': 1.3333333333333333, 'duration': 11.016, 'bitrate': 2153411, 'time': 1158528375, 'tm_is_subst': True, 'size': 2965248 }", "" ], - "asctime": "2020-01-31 08:10:17,666", - "created": 1580454617.6663933, + "asctime": "2020-02-01 20:09:30,583", + "created": 1580584170.5832844, "exc_info": null, "exc_text": null, "filename": "test.py", @@ -1690,46 +5449,51 @@ "lineno": 26, "message": "Expectation (Media data for video_no_date.avi): result = { 'width': 640, 'height': 480, 'ratio': 1.3333333333333333, 'duration': 11.016, 'bitrate': 2153411, 'time': 1158528375, 'tm_is_subst': True, 'size': 2965248 } ()", "module": "test", - "msecs": 666.3932800292969, + "msecs": 583.2843780517578, "msg": "Expectation (%s): result = %s (%s)", "name": "__unittest__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 674.7252941131592, + "relativeCreated": 571.1479187011719, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread" } ], - "msecs": 666.5186882019043, + "msecs": 583.3866596221924, "msg": "Media data for video_no_date.avi is correct (Content %s and Type is %s).", "name": "__tLogger__", "pathname": "src/unittest/test.py", - "process": 21438, + "process": 16493, "processName": "MainProcess", - "relativeCreated": 674.8507022857666, + "relativeCreated": 571.2502002716064, "stack_info": null, - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.00012540817260742188 + "time_consumption": 0.00010228157043457031 } ], - "thread": 140584323143488, + "thread": 140094293296960, "threadName": "MainThread", - "time_consumption": 0.6170980930328369, - "time_finished": "2020-01-31 08:10:17,666", - "time_start": "2020-01-31 08:10:17,049" + "time_consumption": 0.5102407932281494, + "time_finished": "2020-02-01 20:09:30,583", + "time_start": "2020-02-01 20:09:30,073" } }, "testrun_id": "p3", - "time_consumption": 0.6170980930328369, + "time_consumption": 4.128098249435425, "uid_list_sorted": [ - "_XzMFcHYZEem_kd-7nxt1sg" + "_XzMFcHYZEem_kd-7nxt1sg", + "Initialisation", + "Save", + "Resize", + "Rotate", + "Join" ] } ], "unittest_information": { - "Version": "4fc2a0b784677a9bebb642985ef6a243" + "Version": "1bd602a73ceaead82d56c196c3e6a973" } } \ No newline at end of file diff --git a/_testresults_/unittest.pdf b/_testresults_/unittest.pdf index 2ffdbfe..89ce2ff 100644 Binary files a/_testresults_/unittest.pdf and b/_testresults_/unittest.pdf differ diff --git a/common.py b/common.py new file mode 100644 index 0000000..75feda4 --- /dev/null +++ b/common.py @@ -0,0 +1,19 @@ +import os + +FILETYPE_AUDIO = 'audio' +FILETYPE_IMAGE = 'image' +FILETYPE_VIDEO = 'video' + +EXTENTIONS_AUDIO = ['.mp3', ] +EXTENTIONS_IMAGE = ['.jpg', '.jpeg', '.jpe', '.png', '.tif', '.tiff', '.gif', ] +EXTENTIONS_VIDEO = ['.avi', '.mpg', '.mpeg', '.mpe', '.mov', '.qt', '.mp4', '.webm', '.ogv', '.flv', '.3gp', ] + + +def get_filetype(full_path): + ext = os.path.splitext(full_path.lower())[1] + if ext in EXTENTIONS_AUDIO: + return FILETYPE_AUDIO + elif ext in EXTENTIONS_IMAGE: + return FILETYPE_IMAGE + elif ext in EXTENTIONS_VIDEO: + return FILETYPE_VIDEO diff --git a/convert.py b/convert.py new file mode 100644 index 0000000..b64183a --- /dev/null +++ b/convert.py @@ -0,0 +1,35 @@ +import io +from media import common, logger +from PIL import Image +import subprocess +import platform + + +def get_pil_image(media_instance): + try: + media_instance = media_instance._im + except AttributeError: + pass + # + if type(media_instance) == str: + ft = common.get_filetype(media_instance) + if ft == common.FILETYPE_IMAGE: + return Image.open(media_instance).copy() + elif ft == common.FILETYPE_VIDEO: + if platform.system() == 'Linux': + cmd = 'ffmpeg -ss 0.5 -i "' + media_instance + '" -vframes 1 -f image2pipe pipe:1 2> /dev/null' + else: + cmd = 'ffmpeg -ss 0.5 -i "' + media_instance + '" -vframes 1 -f image2pipe pipe:1 2> NULL' + try: + data = subprocess.check_output(cmd, shell=True) + except subprocess.CalledProcessError: + logger.warning('ffmpeg seems to be not installed') + return None + ffmpeg_handle = io.BytesIO(data) + im = Image.open(ffmpeg_handle) + return im.copy() + logger.warning('Filetype is not supported (%s)', media_instance) + elif type(media_instance) == Image.Image: + return media_instance.copy() + else: + logger.warning('Instance type is not supported: %s' % type(media_instance)) diff --git a/metadata.py b/metadata.py index bf6560d..5f10115 100644 --- a/metadata.py +++ b/metadata.py @@ -1,87 +1,46 @@ import logging import os from PIL import Image +import media import subprocess import time -logger_name = 'MEDIA' -logger = logging.getLogger(logger_name) +logger = media.logger -FILETYPE_AUDIO = 'audio' -FILETYPE_IMAGE = 'image' -FILETYPE_VIDEO = 'video' - -EXTENTIONS_AUDIO = ['.mp3', ] -EXTENTIONS_IMAGE = ['.jpg', '.jpeg', '.jpe', '.png', '.tif', '.tiff', '.gif', ] -EXTENTIONS_VIDEO = ['.avi', '.mpg', '.mpeg', '.mpe', '.mov', '.qt', '.mp4', '.webm', '.ogv', '.flv', '.3gp', ] - -KEY_ALBUM = 'album' -KEY_APERTURE = 'aperture' -KEY_ARTIST = 'artist' -KEY_BITRATE = 'bitrate' -KEY_CAMERA = 'camera' -KEY_DURATION = 'duration' -KEY_EXPOSURE_PROGRAM = 'exposure_program' -KEY_EXPOSURE_TIME = 'exposure_time' -KEY_FLASH = 'flash' -KEY_FOCAL_LENGTH = 'focal_length' -KEY_GENRE = 'genre' -KEY_GPS = 'gps' -KEY_HEIGHT = 'height' -KEY_ISO = 'iso' -KEY_ORIENTATION = 'orientation' -KEY_RATIO = 'ratio' -KEY_SIZE = 'size' -KEY_TIME = 'time' # USE time.localtime(value) or datetime.fromtimestamp(value) to convert the timestamp -KEY_TIME_IS_SUBSTITUTION = 'tm_is_subst' -KEY_TITLE = 'title' -KEY_TRACK = 'track' -KEY_WIDTH = 'width' -KEY_YEAR = 'year' __KEY_CAMERA_VENDOR__ = 'camera_vendor' __KEY_CAMERA_MODEL__ = 'camera_model' -def get_filetype(full_path): - ext = os.path.splitext(full_path.lower())[1] - if ext in EXTENTIONS_AUDIO: - return FILETYPE_AUDIO - elif ext in EXTENTIONS_IMAGE: - return FILETYPE_IMAGE - elif ext in EXTENTIONS_VIDEO: - return FILETYPE_VIDEO - - def get_audio_data(full_path): conv_key_dict = {} - conv_key_dict['album'] = (str, KEY_ALBUM) - conv_key_dict['TAG:album'] = (str, KEY_ALBUM) - conv_key_dict['TAG:artist'] = (str, KEY_ARTIST) - conv_key_dict['artist'] = (str, KEY_ARTIST) - conv_key_dict['bit_rate'] = (__int_conv__, KEY_BITRATE) - conv_key_dict['duration'] = (float, KEY_DURATION) - conv_key_dict['TAG:genre'] = (str, KEY_GENRE) - conv_key_dict['genre'] = (str, KEY_GENRE) - conv_key_dict['TAG:title'] = (str, KEY_TITLE) - conv_key_dict['title'] = (str, KEY_TITLE) - conv_key_dict['TAG:track'] = (__int_conv__, KEY_TRACK) - conv_key_dict['track'] = (__int_conv__, KEY_TRACK) - conv_key_dict['TAG:date'] = (__int_conv__, KEY_YEAR) - conv_key_dict['date'] = (__int_conv__, KEY_YEAR) + conv_key_dict['album'] = (str, media.KEY_ALBUM) + conv_key_dict['TAG:album'] = (str, media.KEY_ALBUM) + conv_key_dict['TAG:artist'] = (str, media.KEY_ARTIST) + conv_key_dict['artist'] = (str, media.KEY_ARTIST) + conv_key_dict['bit_rate'] = (__int_conv__, media.KEY_BITRATE) + conv_key_dict['duration'] = (float, media.KEY_DURATION) + conv_key_dict['TAG:genre'] = (str, media.KEY_GENRE) + conv_key_dict['genre'] = (str, media.KEY_GENRE) + conv_key_dict['TAG:title'] = (str, media.KEY_TITLE) + conv_key_dict['title'] = (str, media.KEY_TITLE) + conv_key_dict['TAG:track'] = (__int_conv__, media.KEY_TRACK) + conv_key_dict['track'] = (__int_conv__, media.KEY_TRACK) + conv_key_dict['TAG:date'] = (__int_conv__, media.KEY_YEAR) + conv_key_dict['date'] = (__int_conv__, media.KEY_YEAR) return __adapt__data__(__get_xxprobe_data__(full_path, conv_key_dict), full_path) def get_video_data(full_path): conv_key_dict = {} - conv_key_dict['creation_time'] = (__vid_datetime_conv__, KEY_TIME) - conv_key_dict['TAG:creation_time'] = (__vid_datetime_conv__, KEY_TIME) - conv_key_dict['bit_rate'] = (__int_conv__, KEY_BITRATE) - conv_key_dict['duration'] = (float, KEY_DURATION) - conv_key_dict['height'] = (__int_conv__, KEY_HEIGHT) - conv_key_dict['width'] = (__int_conv__, KEY_WIDTH) - conv_key_dict['display_aspect_ratio'] = (__ratio_conv__, KEY_RATIO) + conv_key_dict['creation_time'] = (__vid_datetime_conv__, media.KEY_TIME) + conv_key_dict['TAG:creation_time'] = (__vid_datetime_conv__, media.KEY_TIME) + conv_key_dict['bit_rate'] = (__int_conv__, media.KEY_BITRATE) + conv_key_dict['duration'] = (float, media.KEY_DURATION) + conv_key_dict['height'] = (__int_conv__, media.KEY_HEIGHT) + conv_key_dict['width'] = (__int_conv__, media.KEY_WIDTH) + conv_key_dict['display_aspect_ratio'] = (__ratio_conv__, media.KEY_RATIO) return __adapt__data__(__get_xxprobe_data__(full_path, conv_key_dict), full_path) @@ -90,25 +49,25 @@ def get_image_data(full_path): def __adapt__data__(data, full_path): - data[KEY_SIZE] = os.path.getsize(full_path) + data[media.KEY_SIZE] = os.path.getsize(full_path) # Join Camera Vendor and Camera Model if __KEY_CAMERA_MODEL__ in data and __KEY_CAMERA_VENDOR__ in data: model = data.pop(__KEY_CAMERA_MODEL__) vendor = data.pop(__KEY_CAMERA_VENDOR__) - data[KEY_CAMERA] = '%s: %s' % (vendor, model) + data[media.KEY_CAMERA] = '%s: %s' % (vendor, model) # Add time if not exists - if KEY_TIME not in data: - if KEY_YEAR in data and KEY_TRACK in data: - if data[KEY_YEAR] != 0: # ignore year 0 - must be wrong + if media.KEY_TIME not in data: + if media.KEY_YEAR in data and media.KEY_TRACK in data: + if data[media.KEY_YEAR] != 0: # ignore year 0 - must be wrong # Use a date where track 1 is the newest in the given year - minute = int(data[KEY_TRACK] / 60) - second = (data[KEY_TRACK] - 60 * minute) % 60 + minute = int(data[media.KEY_TRACK] / 60) + second = (data[media.KEY_TRACK] - 60 * minute) % 60 # - data[KEY_TIME] = int(time.mktime((data[KEY_YEAR], 1, 1, 0, 59 - minute, 59 - second, 0, 0, 0))) - data[KEY_TIME_IS_SUBSTITUTION] = True + data[media.KEY_TIME] = int(time.mktime((data[media.KEY_YEAR], 1, 1, 0, 59 - minute, 59 - second, 0, 0, 0))) + data[media.KEY_TIME_IS_SUBSTITUTION] = True else: - data[KEY_TIME] = int(os.path.getmtime(full_path)) - data[KEY_TIME_IS_SUBSTITUTION] = True + data[media.KEY_TIME] = int(os.path.getmtime(full_path)) + data[media.KEY_TIME_IS_SUBSTITUTION] = True return data @@ -154,19 +113,19 @@ def __get_exif_data__(full_path): else: conv_key_dict = {} # IMAGE - conv_key_dict[0x9003] = (__datetime_conv__, KEY_TIME) - conv_key_dict[0x8822] = (__exposure_program_conv__, KEY_EXPOSURE_PROGRAM) - conv_key_dict[0x829A] = (__num_denum_conv__, KEY_EXPOSURE_TIME) - conv_key_dict[0x9209] = (__flash_conv__, KEY_FLASH) - conv_key_dict[0x829D] = (__num_denum_conv__, KEY_APERTURE) - conv_key_dict[0x920A] = (__num_denum_conv__, KEY_FOCAL_LENGTH) - conv_key_dict[0x8825] = (__gps_conv__, KEY_GPS) - conv_key_dict[0xA003] = (__int_conv__, KEY_HEIGHT) - conv_key_dict[0x8827] = (__int_conv__, KEY_ISO) + conv_key_dict[0x9003] = (__datetime_conv__, media.KEY_TIME) + conv_key_dict[0x8822] = (__exposure_program_conv__, media.KEY_EXPOSURE_PROGRAM) + conv_key_dict[0x829A] = (__num_denum_conv__, media.KEY_EXPOSURE_TIME) + conv_key_dict[0x9209] = (__flash_conv__, media.KEY_FLASH) + conv_key_dict[0x829D] = (__num_denum_conv__, media.KEY_APERTURE) + conv_key_dict[0x920A] = (__num_denum_conv__, media.KEY_FOCAL_LENGTH) + conv_key_dict[0x8825] = (__gps_conv__, media.KEY_GPS) + conv_key_dict[0xA003] = (__int_conv__, media.KEY_HEIGHT) + conv_key_dict[0x8827] = (__int_conv__, media.KEY_ISO) conv_key_dict[0x010F] = (str, __KEY_CAMERA_VENDOR__) conv_key_dict[0x0110] = (str, __KEY_CAMERA_MODEL__) - conv_key_dict[0x0112] = (__int_conv__, KEY_ORIENTATION) - conv_key_dict[0xA002] = (__int_conv__, KEY_WIDTH) + conv_key_dict[0x0112] = (__int_conv__, media.KEY_ORIENTATION) + conv_key_dict[0xA002] = (__int_conv__, media.KEY_WIDTH) for key in conv_key_dict: if key in exif: tp, name = conv_key_dict[key]