-
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graph: do not remove tempfile when opening in viewer
- Loading branch information
Showing
4 changed files
with
40 additions
and
15 deletions.
There are no files selected for viewing
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
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,2 @@ | ||
Generating graph... | ||
Output saved to /tmp/aptly-graph.png |
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,2 @@ | ||
Generating graph... | ||
Displaying png file: xdg-open /tmp/aptly-graph1173098610.png |
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,33 @@ | ||
""" | ||
Test aptly graph | ||
""" | ||
|
||
import os | ||
import re | ||
|
||
from lib import BaseTest | ||
|
||
|
||
class CreateGraphTest(BaseTest): | ||
""" | ||
open graph in viewer | ||
""" | ||
fixtureCmds = ["mkdir -p ../build", "ln -fs /bin/true ../build/xdg-open"] | ||
environmentOverride = {"PATH": os.environ["PATH"] + ":../build"} | ||
runCmd = "aptly graph" | ||
|
||
def outputMatchPrepare(self, s): | ||
return re.sub(r"[0-9]", "", s) | ||
|
||
def teardown(self): | ||
self.run_cmd(["rm", "-f", "../build/xdg-open"]) | ||
|
||
|
||
class CreateGraphOutputTest(BaseTest): | ||
""" | ||
open graph in viewer | ||
""" | ||
runCmd = "aptly graph -output /tmp/aptly-graph.png" | ||
|
||
def teardown(self): | ||
self.run_cmd(["rm", "-f", "/tmp/aptly-graph.png"]) |