# Path: tests/base.py
# class PycoreutilsBaseTest(unittest.TestCase):
#     def setUp(self):
#         self.runner = CliRunner()
#         self.cli = cli


from .base import PycoreutilsBaseTest
from __future__ import unicode_literals



class TestSha1Sum(PycoreutilsBaseTest):
    def test_sha1_stdin(self):
        result = self.runner.invoke(self.cli, ['sha1sum', '-'], input=b'test')
        self.assertEqual(result.exit_code, 0)
        self.assertEqual(result.output, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  -\n')

    def test_sha1_file(self):
        with self.runner.isolated_filesystem():
            with open('hello.txt', 'w') as f:
                f.write('test')

            result = self.runner.invoke(self.cli, ['sha1sum', 'hello.txt'])
            self.assertEqual(result.exit_code, 0)
            self.assertEqual(result.output, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  hello.txt\n')

    def test_sha1_bsd(self):

# Path: tests/base.py
# class PycoreutilsBaseTest(unittest.TestCase):
#     def setUp(self):
#         self.runner = CliRunner()
#         self.cli = cli


# Path: tests/test_sha1sum.py
from .base import PycoreutilsBaseTest

from __future__ import unicode_literals



class TestSha1Sum(PycoreutilsBaseTest):
    def test_sha1_stdin(self):
        result = self.runner.invoke(self.cli, ['sha1sum', '-'], input=b'test')
        self.assertEqual(result.exit_code, 0)
        self.assertEqual(result.output, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  -\n')

    def test_sha1_file(self):
        with self.runner.isolated_filesystem():
            with open('hello.txt', 'w') as f:
                f.write('test')

            result = self.runner.invoke(self.cli, ['sha1sum', 'hello.txt'])
            self.assertEqual(result.exit_code, 0)
            self.assertEqual(result.output, 'a94a8fe5ccb19ba61c4c0873d391e987982fbbd3  hello.txt\n')

    def test_sha1_bsd(self):

        with self.runner.isolated_filesystem():