add python version to beet --version

This commit is contained in:
Johnny Robeson 2016-07-31 02:48:07 -04:00
parent 8a78de44b0
commit 15a8409535
2 changed files with 3 additions and 0 deletions

View file

@ -21,6 +21,7 @@ from __future__ import division, absolute_import, print_function
import os
import re
from platform import python_version
from collections import namedtuple, Counter
from itertools import chain
@ -1317,6 +1318,7 @@ default_commands.append(stats_cmd)
def show_version(lib, opts, args):
print_(u'beets version %s' % beets.__version__)
print_(u'python version {}'.format(python_version()))
# Show plugins.
names = sorted(p.name for p in plugins.find_plugins())
if names:

View file

@ -1242,6 +1242,7 @@ class CommonOptionsParserCliTest(unittest.TestCase, TestHelper):
def test_version(self):
l = self.run_with_output(u'version')
self.assertIn(u'python version', l)
self.assertIn(u'no plugins loaded', l)
# # Need to have plugin loaded