summaryrefslogtreecommitdiff
path: root/tests/test_transcript.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2018-04-16 20:40:13 -0700
committerGitHub <noreply@github.com>2018-04-16 20:40:13 -0700
commit33f2f03610f6c71ed232fe3b608f8592dec88428 (patch)
tree16f9f5c56427965de247dfca92e7481cf3fd4843 /tests/test_transcript.py
parent8aaf6f431ef5e0f5e4e55759a08a22a4591d8f6b (diff)
parent11a9664f3bb9bba7b97b6400d787ee05842739cd (diff)
downloadcmd2-git-33f2f03610f6c71ed232fe3b608f8592dec88428.tar.gz
Merge pull request #354 from python-cmd2/python3
Move to Python 3.4+ only
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r--tests/test_transcript.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py
index f7b4a8f2..a24f2fa5 100644
--- a/tests/test_transcript.py
+++ b/tests/test_transcript.py
@@ -11,9 +11,8 @@ import sys
import re
import random
-import mock
+from unittest import mock
import pytest
-import six
import cmd2
from cmd2 import Cmd, Cmd2TestCase, set_posix_shlex, set_strip_quotes
@@ -33,8 +32,7 @@ class CmdLineApp(Cmd):
# Add stuff to settable and/or shortcuts before calling base class initializer
self.settable['maxrepeats'] = 'Max number of `--repeat`s allowed'
- # Need to use this older form of invoking super class constructor to support Python 2.x and Python 3.x
- Cmd.__init__(self, *args, **kwargs)
+ super().__init__(*args, **kwargs)
self.intro = 'This is an intro banner ...'
# Configure how arguments are parsed for commands using decorators
@@ -267,12 +265,8 @@ def test_transcript(request, capsys, filename, feedback_to_output):
expected_start = ".\n----------------------------------------------------------------------\nRan 1 test in"
expected_end = "s\n\nOK\n"
out, err = capsys.readouterr()
- if six.PY3:
- assert err.startswith(expected_start)
- assert err.endswith(expected_end)
- else:
- assert err == ''
- assert out == ''
+ assert err.startswith(expected_start)
+ assert err.endswith(expected_end)
@pytest.mark.parametrize('expected, transformed', [