Updated package data, pylint fix.

This commit is contained in:
Michael Lazar
2015-12-15 00:15:20 -08:00
parent 49e2d1aa4f
commit 52760e4000
3 changed files with 7 additions and 7 deletions

View File

@@ -7,11 +7,11 @@ import shutil
import argparse import argparse
from functools import partial from functools import partial
from six.moves import configparser, input import six
from six.moves import configparser
from . import docs, __version__ from . import docs, __version__
PACKAGE = os.path.dirname(__file__) PACKAGE = os.path.dirname(__file__)
HOME = os.path.expanduser('~') HOME = os.path.expanduser('~')
TEMPLATE = os.path.join(PACKAGE, 'templates') TEMPLATE = os.path.join(PACKAGE, 'templates')
@@ -65,7 +65,8 @@ def copy_default_config(filename=CONFIG):
if os.path.exists(filename): if os.path.exists(filename):
try: try:
ch = input('File %s already exists, overwrite? y/[n]):' % filename) ch = six.moves.input(
'File %s already exists, overwrite? y/[n]):' % filename)
if ch not in ('Y', 'y'): if ch not in ('Y', 'y'):
return return
except KeyboardInterrupt: except KeyboardInterrupt:

View File

@@ -20,7 +20,7 @@ setuptools.setup(
license='MIT', license='MIT',
keywords='reddit terminal praw curses', keywords='reddit terminal praw curses',
packages=['rtv'], packages=['rtv'],
package_data={'rtv': ['templates/index.html']}, package_data={'rtv': ['templates/*', 'rtv.cfg']},
data_files=[("share/man/man1", ["rtv.1"])], data_files=[("share/man/man1", ["rtv.1"])],
extras_require={ extras_require={
':python_version=="2.6" or python_version=="2.7"': ['futures']}, ':python_version=="2.6" or python_version=="2.7"': ['futures']},

View File

@@ -17,10 +17,9 @@ def test_copy_default_config():
"Make sure the default config file was included in the package" "Make sure the default config file was included in the package"
with NamedTemporaryFile(suffix='.cfg') as fp: with NamedTemporaryFile(suffix='.cfg') as fp:
with mock.patch('rtv.config.input', return_value='y'): with mock.patch('rtv.config.six.moves.input', return_value='y'):
copy_default_config(fp.name) copy_default_config(fp.name)
with open(DEFAULT_CONFIG) as fp_default: assert fp.read()
assert fp.read() == fp_default.read()
permissions = os.stat(fp.name).st_mode & 0o777 permissions = os.stat(fp.name).st_mode & 0o777
assert permissions == 0o664 assert permissions == 0o664