mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
Build also on python 3.2 and 3.3
This commit is contained in:
@@ -2,4 +2,6 @@ language: python
|
|||||||
python:
|
python:
|
||||||
- "2.6"
|
- "2.6"
|
||||||
- "2.7"
|
- "2.7"
|
||||||
|
- "3.2"
|
||||||
|
- "3.3"
|
||||||
script: make test
|
script: make test
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
import sys
|
import sys
|
||||||
from StringIO import StringIO
|
try:
|
||||||
|
from StringIO import StringIO
|
||||||
|
except ImportError:
|
||||||
|
from io import StringIO
|
||||||
|
|
||||||
|
|
||||||
stdout = None
|
stdout = None
|
||||||
|
|
||||||
|
|
||||||
def assert_printed(expected):
|
def assert_printed(expected):
|
||||||
if isinstance(expected, basestring):
|
success = expected in stdout.getvalue()
|
||||||
success = expected in stdout.getvalue()
|
assert success, 'expected text "%s" not printed' % expected
|
||||||
assert success, 'expected text "%s" not printed' % expected
|
|
||||||
else:
|
|
||||||
success = expected.match(stdout.getvalue())
|
|
||||||
assert success, 'expected pattern "%s" not printed' % expected.pattern
|
|
||||||
|
|
||||||
|
|
||||||
def assert_not_printed(expected):
|
def assert_not_printed(expected):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
from asciinema.commands.version import VersionCommand
|
from asciinema.commands.version import VersionCommand
|
||||||
from asciinema.common import VERSION
|
from asciinema.common import VERSION
|
||||||
from test_helper import assert_printed, Test
|
from .test_helper import assert_printed, Test
|
||||||
|
|
||||||
|
|
||||||
class TestVersionCommand(Test):
|
class TestVersionCommand(Test):
|
||||||
|
|||||||
Reference in New Issue
Block a user