Skip to content

Commit a6fef36

Browse files
committed
Use test config (fixes bpython#654)
1 parent 5d1c976 commit a6fef36

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bpython/test/test_curtsies_painting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
from bpython.repl import History
1919
from bpython.curtsiesfrontend.repl import INCONSISTENT_HISTORY_MSG, \
2020
CONTIGUITY_BROKEN_MSG
21-
from bpython.test import FixLanguageTestCase as TestCase
21+
from bpython.test import FixLanguageTestCase as TestCase, TEST_CONFIG
2222

2323

2424
def setup_config():
2525
config_struct = config.Struct()
26-
config.loadini(config_struct, os.devnull)
26+
config.loadini(config_struct, TEST_CONFIG)
2727
config_struct.cli_suggestion_width = 1
2828
return config_struct
2929

bpython/test/test_curtsies_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from bpython import args
1919
from bpython._py3compat import py3
2020
from bpython.test import (FixLanguageTestCase as TestCase, MagicIterMock, mock,
21-
unittest)
21+
unittest, TEST_CONFIG)
2222

2323
from curtsies import events
2424

@@ -31,7 +31,7 @@ def invalidate_caches():
3131

3232
def setup_config(conf):
3333
config_struct = config.Struct()
34-
config.loadini(config_struct, os.devnull)
34+
config.loadini(config_struct, TEST_CONFIG)
3535
for key, value in conf.items():
3636
if not hasattr(config_struct, key):
3737
raise ValueError("%r is not a valid config attribute" % (key, ))

bpython/test/test_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
from bpython._py3compat import py3
1212
from bpython import config, repl, cli, autocomplete
1313
from bpython.test import MagicIterMock, mock, FixLanguageTestCase as TestCase
14-
from bpython.test import unittest
14+
from bpython.test import unittest, TEST_CONFIG
1515

1616

1717
pypy = 'PyPy' in sys.version
1818

1919

2020
def setup_config(conf):
2121
config_struct = config.Struct()
22-
config.loadini(config_struct, os.devnull)
22+
config.loadini(config_struct, TEST_CONFIG)
2323
if 'autocomplete_mode' in conf:
2424
config_struct.autocomplete_mode = conf['autocomplete_mode']
2525
return config_struct

0 commit comments

Comments
 (0)