delete remaining unneded code

This commit is contained in:
Suhas 2021-02-06 20:04:13 -05:00
parent 06f5ef3682
commit 1bd5931c43
3 changed files with 4 additions and 10 deletions

View file

@ -388,6 +388,7 @@ def all_input_was_used(context):
for temp in context.iter_text: for temp in context.iter_text:
assert "" == temp, "Not all inputs were consumed" assert "" == temp, "Not all inputs were consumed"
@when('we run "{command}"') @when('we run "{command}"')
@when('we run "{command}" and pipe') @when('we run "{command}" and pipe')
@when('we run "{command}" and pipe "{text}"') @when('we run "{command}" and pipe "{text}"')
@ -397,8 +398,8 @@ def run(context, command, text=""):
if "config_path" in context and context.config_path is not None: if "config_path" in context and context.config_path is not None:
with open(context.config_path) as f: with open(context.config_path) as f:
context.jrnl_config = yaml.load(f, Loader=yaml.FullLoader) context.jrnl_config = yaml.load(f, Loader=yaml.FullLoader)
else: else:
context.jrnl_config = None context.jrnl_config = None
if "cache_dir" in context and context.cache_dir is not None: if "cache_dir" in context and context.cache_dir is not None:
cache_dir = os.path.join("features", "cache", context.cache_dir) cache_dir = os.path.join("features", "cache", context.cache_dir)

View file

@ -10,7 +10,7 @@ from .markdown_exporter import MarkdownExporter
from .tag_exporter import TagExporter from .tag_exporter import TagExporter
from .dates_exporter import DatesExporter from .dates_exporter import DatesExporter
from .template_exporter import __all__ as template_exporters from .template_exporter import __all__ as template_exporters
from .text_exporter import PrettyExporter, TextExporter from .text_exporter import TextExporter
from .xml_exporter import XMLExporter from .xml_exporter import XMLExporter
from .yaml_exporter import YAMLExporter from .yaml_exporter import YAMLExporter
@ -20,7 +20,6 @@ __exporters = [
TagExporter, TagExporter,
DatesExporter, DatesExporter,
TextExporter, TextExporter,
PrettyExporter,
XMLExporter, XMLExporter,
YAMLExporter, YAMLExporter,
FancyExporter, FancyExporter,

View file

@ -15,9 +15,3 @@ def test_colorize(data_fixture):
colorized_string = colorize(string, "BLUE", True) colorized_string = colorize(string, "BLUE", True)
assert colorized_string == Style.BRIGHT + Fore.BLUE + string + Style.RESET_ALL assert colorized_string == Style.BRIGHT + Fore.BLUE + string + Style.RESET_ALL
def test_colorize_none(data_fixture):
string = data_fixture
colorized_string = colorize(string, None, False)
assert colorized_string == string