From 07138f86dc1095d3d16ac40d2598e754cba66622 Mon Sep 17 00:00:00 2001 From: Austin Marino Date: Mon, 14 Oct 2019 18:41:06 -0700 Subject: [PATCH] Fixed styling and test to pass cli --- docs/plugins/export.rst | 5 ++--- test/test_export.py | 11 ++++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/plugins/export.rst b/docs/plugins/export.rst index 16f5e8ac1..460d4d41c 100644 --- a/docs/plugins/export.rst +++ b/docs/plugins/export.rst @@ -39,8 +39,7 @@ The ``export`` command has these command-line options: * ``--append``: Appends the data to the file instead of writing. -* ``--format`` or ``-f``: Specifies the format the data will be exported as. If not informed, JSON will be used by default. -The format options include csv, json and xml. +* ``--format`` or ``-f``: Specifies the format the data will be exported as. If not informed, JSON will be used by default. The format options include csv, json and xml. Configuration ------------- @@ -90,4 +89,4 @@ The default options look like this:: formatting: encoding: 'unicode' xml_declaration: True - method: 'xml' \ No newline at end of file + method: 'xml' diff --git a/test/test_export.py b/test/test_export.py index 2ebc6cf95..c48a151f5 100644 --- a/test/test_export.py +++ b/test/test_export.py @@ -21,12 +21,9 @@ from __future__ import division, absolute_import, print_function import unittest from test.helper import TestHelper import re -import beets -import beets.plugins class ExportPluginTest(unittest.TestCase, TestHelper): - def setUp(self): self.setup_beets() self.load_plugins('export') @@ -61,7 +58,7 @@ class ExportPluginTest(unittest.TestCase, TestHelper): artist=item1.artist ) for key, val in self.test_values.items(): - self.check_assertIn( + self.check_assertin( actual=actual, str_format='"{0}":"{1}"', key=key, @@ -75,7 +72,7 @@ class ExportPluginTest(unittest.TestCase, TestHelper): artist=item1.artist ) for key, val in self.test_values.items(): - self.check_assertIn( + self.check_assertin( actual=actual, str_format='{0}{1}', key='', @@ -89,14 +86,14 @@ class ExportPluginTest(unittest.TestCase, TestHelper): artist=item1.artist ) for key, val in self.test_values.items(): - self.check_assertIn( + self.check_assertin( actual=actual, str_format='<{0}>{1}', key=key, val=val ) - def check_assertIn(self, actual, str_format, key, val): + def check_assertin(self, actual, str_format, key, val): expected = str_format.format(key, val) self.assertIn( expected,