Skip to content

Commit

Permalink
issue #41: enforce matching pad length
Browse files Browse the repository at this point in the history
  • Loading branch information
rsgalloway committed Sep 22, 2017
1 parent 06a6cd8 commit 69b83b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions pyseq.py
Expand Up @@ -57,7 +57,7 @@
from glob import iglob
from datetime import datetime

__version__ = "0.5.0"
__version__ = "0.5.1"

# default serialization format string
global_format = '%4l %h%p%t %R'
Expand Down Expand Up @@ -809,7 +809,9 @@ def diff(f1, f2):
for i in range(0, len(l1)):
m1 = l1.pop(0)
m2 = l2.pop(0)
if m1.start() == m2.start() and m1.group() != m2.group():
if (m1.start() == m2.start()) and \
(m1.group() != m2.group()) and \
(len(m1.group()) == len(m2.group())):
d.append({
'start': m1.start(),
'end': m1.end(),
Expand Down
7 changes: 4 additions & 3 deletions tests/test_pyseq.py
Expand Up @@ -526,19 +526,20 @@ def test_uncompress_is_working_properly_6(self):
)

def test_uncompress_is_working_properly_7(self):
"""testing if uncompress is working properly
"""testing if uncompress is working properly,
the frame 100000 does not fit inside the pad length
"""
seq7 = uncompress(
'a.%03d.tga 1-100000 ([1-10, 100000])',
fmt='%h%p%t %r (%R)'
)
self.assertEqual(
'a.1-100000.tga',
'a.1-10.tga',
str(seq7)
)

self.assertEqual(
11,
10,
len(seq7)
)

Expand Down

0 comments on commit 69b83b1

Please sign in to comment.