| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a8787b3 commit dbd8066
16 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -488,7 +488,7 @@ def matches(self, cursor_offset, line, **kwargs): | |||
| 488 | 488 | self._orig_start = None | |
| 489 | 489 | return None | |
| 490 | 490 | except IndexError: | |
| 491 | - # for https://github.com/bpython/bpython/issues/483 | ||
| 491 | + # for #483 | ||
| 492 | 492 | self._orig_start = None | |
| 493 | 493 | return None | |
| 494 | 494 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,11 +2,7 @@ | |||
| 2 | 2 | import tempfile | |
| 3 | 3 | import textwrap | |
| 4 | 4 | ||
| 5 | - try: | ||
| 6 | - import unittest2 as unittest | ||
| 7 | - except ImportError: | ||
| 8 | - import unittest | ||
| 9 | - | ||
| 5 | + from bpython.test import unittest | ||
| 10 | 6 | from bpython import config | |
| 11 | 7 | ||
| 12 | 8 | TEST_THEME_PATH = os.path.join(os.path.dirname(__file__), "test.theme") | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,10 +6,7 @@ | |||
| 6 | 6 | import termios | |
| 7 | 7 | import textwrap | |
| 8 | 8 | ||
| 9 | - try: | ||
| 10 | - import unittest2 as unittest | ||
| 11 | - except ImportError: | ||
| 12 | - import unittest | ||
| 9 | + from bpython.test import unittest | ||
| 13 | 10 | ||
| 14 | 11 | try: | |
| 15 | 12 | from twisted.internet import reactor | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,6 @@ | |||
| 1 | 1 | import sys | |
| 2 | 2 | ||
| 3 | - from bpython.test import mock | ||
| 4 | - | ||
| 5 | - try: | ||
| 6 | - import unittest2 as unittest | ||
| 7 | - except ImportError: | ||
| 8 | - import unittest | ||
| 9 | - | ||
| 3 | + from bpython.test import mock, unittest | ||
| 10 | 4 | from bpython.curtsiesfrontend.coderunner import CodeRunner, FakeOutput | |
| 11 | 5 | ||
| 12 | 6 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,6 @@ | |||
| 1 | 1 | from __future__ import unicode_literals | |
| 2 | 2 | ||
| 3 | - try: | ||
| 4 | - import unittest2 as unittest | ||
| 5 | - except ImportError: | ||
| 6 | - import unittest | ||
| 7 | - | ||
| 3 | + from bpython.test import unittest | ||
| 8 | 4 | from bpython.curtsiesfrontend import parse | |
| 9 | 5 | from curtsies.fmtfuncs import yellow, cyan, green, bold | |
| 10 | 6 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,11 +9,6 @@ | |||
| 9 | 9 | from contextlib import contextmanager | |
| 10 | 10 | from six.moves import StringIO | |
| 11 | 11 | ||
| 12 | - try: | ||
| 13 | - import unittest2 as unittest | ||
| 14 | - except ImportError: | ||
| 15 | - import unittest | ||
| 16 | - | ||
| 17 | 12 | from bpython.curtsiesfrontend import repl as curtsiesrepl | |
| 18 | 13 | from bpython.curtsiesfrontend import interpreter | |
| 19 | 14 | from bpython.curtsiesfrontend import events as bpythonevents | |
@@ -22,7 +17,7 @@ | |||
| 22 | 17 | from bpython import args | |
| 23 | 18 | from bpython._py3compat import py3 | |
| 24 | 19 | from bpython.test import (FixLanguageTestCase as TestCase, MagicIterMock, mock, | |
| 25 | - builtin_target) | ||
| 20 | + builtin_target, unittest) | ||
| 26 | 21 | ||
| 27 | 22 | ||
| 28 | 23 | def setup_config(conf): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,18 +1,13 @@ | |||
| 1 | 1 | import os | |
| 2 | 2 | ||
| 3 | - try: | ||
| 4 | - import unittest2 as unittest | ||
| 5 | - except ImportError: | ||
| 6 | - import unittest | ||
| 7 | - | ||
| 8 | 3 | try: | |
| 9 | 4 | import watchdog | |
| 10 | 5 | from bpython.curtsiesfrontend.filewatch import ModuleChangedEventHandler | |
| 11 | 6 | has_watchdog = True | |
| 12 | 7 | except ImportError: | |
| 13 | 8 | has_watchdog = False | |
| 14 | 9 | ||
| 15 | - from bpython.test import mock | ||
| 10 | + from bpython.test import mock, unittest | ||
| 16 | 11 | ||
| 17 | 12 | @unittest.skipUnless(has_watchdog, "watchdog required") | |
| 18 | 13 | class TestModuleChangeEventHandler(unittest.TestCase): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,7 @@ | |||
| 1 | - try: | ||
| 2 | - import unittest2 as unittest | ||
| 3 | - except ImportError: | ||
| 4 | - import unittest | ||
| 5 | - | ||
| 6 | 1 | from six.moves import range | |
| 7 | 2 | ||
| 8 | 3 | from bpython.history import History | |
| 4 | + from bpython.test import unittest | ||
| 9 | 5 | ||
| 10 | 6 | ||
| 11 | 7 | class TestHistory(unittest.TestCase): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,11 +1,7 @@ | |||
| 1 | 1 | from __future__ import unicode_literals | |
| 2 | 2 | ||
| 3 | 3 | from bpython import importcompletion | |
| 4 | - | ||
| 5 | - try: | ||
| 6 | - import unittest2 as unittest | ||
| 7 | - except ImportError: | ||
| 8 | - import unittest | ||
| 4 | + from bpython.test import unittest | ||
| 9 | 5 | ||
| 10 | 6 | ||
| 11 | 7 | class TestSimpleComplete(unittest.TestCase): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,16 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | 3 | import os | |
| 4 | 4 | ||
| 5 | - try: | ||
| 6 | - import unittest2 as unittest | ||
| 7 | - except ImportError: | ||
| 8 | - import unittest | ||
| 9 | - | ||
| 10 | 5 | from bpython import inspection | |
| 6 | + from bpython.test import unittest | ||
| 11 | 7 | from bpython.test.fodder import encoding_ascii | |
| 12 | 8 | from bpython.test.fodder import encoding_latin1 | |
| 13 | 9 | from bpython.test.fodder import encoding_utf8 | |
| 14 | 10 | ||
| 11 | + | ||
| 15 | 12 | foo_ascii_only = u'''def foo(): | |
| 16 | 13 | """Test""" | |
| 17 | 14 | pass | |
| Back | FazBrowse Home | New Git URL |
0 commit comments