Skip to content

Commit

Permalink
Remove test relying on dmtxwrite due to issues in last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmulqueen committed Jul 21, 2015
1 parent c2d5ece commit e7146cb
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions pystrich/datamatrix/test_datamatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,6 @@ def test_encode_decode(self):
fin = os.popen("sh -c '%s datamatrix-test.png'" % dmtxread_path)
self.assertEqual(fin.readline(), string)

def test_against_dmtx(self):
self.maxDiff = None
"""Compare the output of this library with that of dmtxwrite"""

for string in MatrixTest.test_strings:
encoder = DataMatrixEncoder(string)
mine = encoder.get_ascii()

if not dmtxwrite_path:
print("dmtxwrite is not installed or cannot be found, skipping encoding tests - Debian package "
"libdmtx-utils" % dmtxwrite_path)
else:
p = subprocess.Popen([dmtxwrite_path, "-p"], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
stdout, stderr = p.communicate(string.encode("ascii"))
output = ""
for line in stdout.decode("ascii").splitlines():
line = line.lstrip()
if line and line[0] == 'X':
output += line + "\n"
self.assertEqual(output, mine)

def test_encoding(self):
"""Test that text is correctly encoded, and also that padding
and error codewords are correctly added"""
Expand Down

0 comments on commit e7146cb

Please sign in to comment.