-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically switch renderer to EPS
This makes `./run -o 840147413574.eps 840147413574` generate an EPS file instead of an SVG file.
- Loading branch information
Showing
3 changed files
with
25 additions
and
5 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
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,13 @@ | ||
import unittest | ||
|
||
import tutils # noqa | ||
from beautiful_barcode.renderers import make_renderer, InkscapeEPSRenderer | ||
|
||
|
||
class RendererTest(unittest.TestCase): | ||
def test_auto_eps(self): | ||
svg_renderer = make_renderer('auto', extension='.svg') | ||
self.assertFalse(isinstance(svg_renderer, InkscapeEPSRenderer)) # actual result is implementation-defined | ||
|
||
eps_renderer = make_renderer('auto', extension='.eps') | ||
self.assertTrue(isinstance(eps_renderer, InkscapeEPSRenderer)) |