Skip to content

Commit

Permalink
remove unused imports to pass tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mariabui committed May 4, 2023
1 parent d3fd8ea commit 364e2d0
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions test/test_get_sub_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

import unittest
import os
from unittest.mock import patch
from io import StringIO
from testfixtures import TempDirectory
import pytest

from topydo.Commands import get_subcommand
from topydo.commands.AddCommand import AddCommand
from topydo.commands.DeleteCommand import DeleteCommand
Expand Down Expand Up @@ -420,13 +418,14 @@ def test_invalidCommand(self):
self.assertIn('Error invalid command: joker :( Please try again. ', test_file_name )
os.remove('test_file.txt')

# @pytest.fixture(autouse=True)
# def _pass_fixtures(self, capsys):
# self.capsys = capsys
# def test_invalidCommand2(self):
# get_subcommand(['helloworld'])
# captured = self.capsys.readouterr()
# self.assertEqual('Error invalid command: helloworld :( Please try again. \n', captured.out)
@pytest.fixture(autouse=True)
def _pass_fixtures(self, capsys):
self.capsys = capsys

def test_invalidCommand2(self):
get_subcommand(['helloworld'])
captured = self.capsys.readouterr()
self.assertEqual('Error invalid command: helloworld :( Please try again. \n', captured.out)


if __name__ == '__main__':
Expand Down

0 comments on commit 364e2d0

Please sign in to comment.