-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(multi): Rearrange files as requested in review
- Loading branch information
Showing
5 changed files
with
29 additions
and
21 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/env python | ||
|
||
import unittest | ||
import subprocess | ||
import sys | ||
from pathlib import Path | ||
import difflib | ||
|
||
|
||
class TestMulti(unittest.TestCase): | ||
|
||
def test_01multi_nogui(self): | ||
try: | ||
# The -Wignore flag to Python is for the sake of an | ||
# inkscape-internal use of a deprecated Python construct. When | ||
# we are no longer testing on the offending version of Inkscape | ||
# (1.2 as released), it can be removed. | ||
commands = subprocess.run([sys.executable, "-Wignore::DeprecationWarning", "silhouette_multi.py", "--block=true", "-d=true", "-g=false", "-p=test/data/multi.cPickle", "test/data/multi_color.svg"], check=True, capture_output=True).stderr.decode().replace("\r","") | ||
commandref = Path("./test/data/multi.commands").read_text() | ||
if (commandref != commands): | ||
diffs = difflib.context_diff( | ||
commandref.split(), commands.split()) | ||
sys.stdout.writelines(diffs) | ||
self.assertEqual(commandref, commands) | ||
except subprocess.CalledProcessError as e: | ||
print(e.output.decode()) | ||
print(e) | ||
self.assertEqual(e.returncode, 0) | ||
assert False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters