self = <swh.model.tests.test_cli.TestIdentify testMethod=test_exclude>
def test_exclude(self):
"""exclude patterns"""
self.make_from_tarball(self.tmpdir_name)
path = os.path.join(self.tmpdir_name, b"sample-folder")
excluded_dir = os.path.join(path, b"excluded_dir\x96")
os.mkdir(excluded_dir)
with open(os.path.join(excluded_dir, b"some_file"), "w") as f:
f.write("content")
result = self.runner.invoke(
cli.identify, ["--type", "directory", "--exclude", "excluded_*", path]
)
> self.assertSWHID(result, "swh:1:dir:e8b0f1466af8608c8a3fb9879db172b887e80759")
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:164:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_cli.py:27: in assertSWHID
self.assertEqual(result.output.split()[0], swhid)
E AssertionError: 'File' != 'swh:1:dir:e8b0f1466af8608c8a3fb9879db172b887e80759'
E - File
E + swh:1:dir:e8b0f1466af8608c8a3fb9879db172b887e80759
TEST RESULT
TEST RESULT
- Run At
- Feb 16 2021, 2:43 PM