File: test_parser.py

package info (click to toggle)
mmllib 0.3.0.post1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,512 kB
  • ctags: 51
  • sloc: python: 1,534; makefile: 11; xml: 1
file content (559 lines) | stat: -rw-r--r-- 28,521 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
#!/usr/bin/env python
# ~*~ coding: utf-8 ~*~

# Copyright © 2017
#       Dominik George <nik@naturalnet.de>
#
# Provided that these terms and disclaimer and all copyright notices
# are retained or reproduced in an accompanying document, permission
# is granted to deal in this work without restriction, including un‐
# limited rights to use, publicly perform, distribute, sell, modify,
# merge, give away, or sublicence.
#
# This work is provided “AS IS” and WITHOUT WARRANTY of any kind, to
# the utmost extent permitted by applicable law, neither express nor
# implied; without malicious intent or gross negligence. In no event
# may a licensor, author or contributor be held liable for indirect,
# direct, other damage, loss, or other issues arising in any way out
# of dealing in the work, even if advised of the possibility of such
# damage or existence of a defect, except proven that it results out
# of said person’s immediate fault when using the work as intended.

import os
import unittest

from mmllib.parser import mml_file, mml_file_meta

class ParserTests(unittest.TestCase):
    def setUp(self):
        self.datadir = os.path.join(os.path.dirname(__file__), "data")
        self.examplesdir = os.path.abspath(os.path.join(self.datadir, "..", "..", "examples"))

    def test_mml_file_meta(self):
        mmlfile = os.path.join(self.examplesdir, "loreley.mml")
        res_meta = mml_file_meta(mmlfile)
        expected_meta = {'arranger': u'Klavier: August Linder; MML: mirabilos',
                         'composer': u'Ph. Friedrich Silcher (1789\u20131860), 1837',
                         'copyright': u'MML encoding & arrangement \xa9 2016 mirabilos, published under The MirOS Licence; copyright for text, music, and piano arrangement has expired',
                         'duration': 37.89473684210526,
                         'encoder': u'mirabilos, 2016',
                         'instruments': u'Piano, Voice',
                         'key signature': u'C Major',
                         'language': u'German',
                         'lyrics': u'Heinrich Heine (1797\u20131856), 1824',
                         'measures': u'16',
                         'mml tracks': u'4 (5)',
                         'pickup measure': u'1/8',
                         'source': u'Linder, August (Hrsg.): Deutsche Weisen : Die beliebtesten Volks- und geistlichen Lieder. Stuttgart: Albert Auer\u2019s Musikverlag, n.d., c. 1900.',
                         'tempo': u'Andante',
                         'time signature': u'6/8',
                         'title': u'Loreley',
                         'verses': u'3',
                         'voices': 4}
        self.assertDictEqual(res_meta, expected_meta)

    def test_mml_file(self):
        mmlfile = os.path.join(self.examplesdir, "loreley.mml")
        res = mml_file(mmlfile)
        expected = [[(391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 0.5921052631578948),
                     (440.0, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (523.2511306011972, 0.39473684210526316),
                     (493.8833012561241, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (349.2282314330039, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (329.6275569128699, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.39473684210526316),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 1.529605263157895),
                     (0, 0.4440789473684211),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 0.5921052631578948),
                     (440.0, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (523.2511306011972, 0.39473684210526316),
                     (493.8833012561241, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (349.2282314330039, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (329.6275569128699, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (261.6255653005986, 1.529605263157895),
                     (0, 0.4440789473684211),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (293.6647679174076, 0.5921052631578948),
                     (329.6275569128699, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (493.8833012561241, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (440.0, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (369.9944227116344, 0.39473684210526316),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 1.875),
                     (0, 0.09868421052631582),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (440.0, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (523.2511306011972, 0.39473684210526316),
                     (493.8833012561241, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (391.99543598174927, 0.7894736842105263),
                     (659.2551138257398, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (587.3295358348151, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (587.3295358348151, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (523.2511306011972, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (523.2511306011972, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (523.2511306011972, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (493.8833012561241, 0.39473684210526316),
                     (440.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (493.8833012561241, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (523.2511306011972, 1.529605263157895),
                     (0, 0.4440789473684211),
                     1],
                    [(0, 0.39473684210526316),
                     1,
                     (329.6275569128699, 0.5921052631578948),
                     (349.2282314330039, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.7401315789473684),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (293.6647679174076, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (261.6255653005986, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (261.6255653005986, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.39473684210526316),
                     (220.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (261.6255653005986, 1.529605263157895),
                     (0, 0.8388157894736843),
                     1,
                     (329.6275569128699, 0.5921052631578948),
                     (349.2282314330039, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.7401315789473684),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (293.6647679174076, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (261.6255653005986, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (261.6255653005986, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (246.94165062806206, 0.5921052631578948),
                     (261.6255653005986, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (293.6647679174076, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (261.6255653005986, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (246.94165062806206, 0.6907894736842105),
                     (0, 0.493421052631579),
                     (220.0, 0.39473684210526316),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (97.99885899543733, 0.39473684210526316),
                     (123.47082531403103, 0.39473684210526316),
                     (130.8127826502993, 0.39473684210526316),
                     (146.8323839587038, 0.39473684210526316),
                     (130.8127826502993, 0.39473684210526316),
                     (123.47082531403103, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (349.2282314330039, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.7401315789473684),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 0.7894736842105263),
                     (391.99543598174927, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 0.518092105263158),
                     (0, 0.07401315789473684),
                     (329.6275569128699, 0.17269736842105263),
                     (0, 0.024671052631578955),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.7401315789473684),
                     (0, 0.04934210526315791),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (329.6275569128699, 1.529605263157895),
                     (0, 0.4440789473684211),
                     1],
                    [(0, 0.39473684210526316),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 1.1842105263157896),
                     (195.99771799087463, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (195.99771799087463, 0.39473684210526316),
                     (0, 1.973684210526316),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 1.1842105263157894),
                     (146.8323839587038, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (146.8323839587038, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (174.61411571650194, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (164.81377845643496, 0.39473684210526316),
                     (0, 1.973684210526316),
                     1,
                     (0, 1.1842105263157894),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.8388157894736843),
                     1,
                     (391.99543598174927, 1.036184210526316),
                     (0, 0.14802631578947367),
                     (329.6275569128699, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (329.6275569128699, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (293.6647679174076, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (146.8323839587038, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (146.8323839587038, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (146.8323839587038, 1.875),
                     (0, 0.09868421052631582),
                     (349.2282314330039, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 2.368421052631579),
                     1,
                     (0, 1.1842105263157894),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (195.99771799087463, 0.39473684210526316),
                     (0, 1.5789473684210527),
                     1],
                    [(0, 0.39473684210526316),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (130.8127826502993, 0.19736842105263158),
                     (220.0, 0.19736842105263158),
                     (293.6647679174076, 0.39473684210526316),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (87.30705785825097, 0.19736842105263158),
                     (174.61411571650194, 0.19736842105263158),
                     (220.0, 0.39473684210526316),
                     (174.61411571650194, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (97.99885899543733, 0.19736842105263158),
                     (164.81377845643496, 0.19736842105263158),
                     (195.99771799087463, 0.39473684210526316),
                     (164.81377845643496, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (97.99885899543733, 0.6907894736842105),
                     (0, 0.09868421052631582),
                     (97.99885899543733, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.39473684210526316),
                     (97.99885899543733, 0.39473684210526316),
                     (82.4068892282175, 0.39473684210526316),
                     (65.40639132514966, 0.6907894736842105),
                     (0, 0.493421052631579),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (130.8127826502993, 0.19736842105263158),
                     (220.0, 0.19736842105263158),
                     (293.6647679174076, 0.39473684210526316),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (87.30705785825097, 0.19736842105263158),
                     (174.61411571650194, 0.19736842105263158),
                     (220.0, 0.39473684210526316),
                     (174.61411571650194, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (97.99885899543733, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (130.8127826502993, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (97.99885899543733, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (97.99885899543733, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (97.99885899543733, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.39473684210526316),
                     (82.4068892282175, 0.39473684210526316),
                     (97.99885899543733, 0.39473684210526316),
                     (65.40639132514966, 0.6907894736842105),
                     (0, 0.493421052631579),
                     1,
                     (97.99885899543733, 0.39473684210526316),
                     (146.8323839587038, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (97.99885899543733, 0.39473684210526316),
                     (146.8323839587038, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (97.99885899543733, 0.39473684210526316),
                     (146.8323839587038, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (65.40639132514966, 0.39473684210526316),
                     (164.81377845643496, 0.39473684210526316),
                     (220.0, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (73.41619197935188, 0.39473684210526316),
                     (146.8323839587038, 0.39473684210526316),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.8388157894736843),
                     (184.9972113558172, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (246.94165062806206, 0.39473684210526316),
                     (293.6647679174076, 0.39473684210526316),
                     (329.6275569128699, 0.39473684210526316),
                     (349.2282314330039, 0.39473684210526316),
                     (329.6275569128699, 0.39473684210526316),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.39473684210526316),
                     (195.99771799087463, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (130.8127826502993, 0.19736842105263158),
                     (220.0, 0.19736842105263158),
                     (293.6647679174076, 0.39473684210526316),
                     (246.94165062806206, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.17269736842105263),
                     (0, 0.6167763157894737),
                     (87.30705785825097, 0.19736842105263158),
                     (220.0, 0.19736842105263158),
                     (293.6647679174076, 0.17269736842105263),
                     (0, 0.6167763157894737),
                     1,
                     (97.99885899543733, 0.19736842105263158),
                     (195.99771799087463, 0.19736842105263158),
                     (261.6255653005986, 0.17269736842105263),
                     (0, 0.6167763157894737),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (261.6255653005986, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     (293.6647679174076, 0.34539473684210525),
                     (0, 0.04934210526315791),
                     1,
                     (130.8127826502993, 0.39473684210526316),
                     (164.81377845643496, 0.39473684210526316),
                     (195.99771799087463, 0.39473684210526316),
                     (130.8127826502993, 0.34539473684210525),
                     (0, 0.4440789473684211),
                     1]]
        self.assertListEqual(res, expected)

if __name__ == "__main__":
    unittest.main()