def test_get_tags(): tags = mpsinfo.get_tags(common.TESTS, os.path.join(common.TESTS, "foo", "bar", "baz.jpg")) assert tags["basename"] == "baz.jpg" assert tags["location"] == "foo/bar" assert len(tags["tags"]) == 2 assert u"foo" in tags["tags"] assert u"bar" in tags["tags"]
def test_get_tags(): tags = mpsinfo.get_tags( common.TESTS, os.path.join(common.TESTS, 'foo', 'bar', 'baz.jpg')) assert tags['basename'] == 'baz.jpg' assert tags['location'] == 'foo/bar' assert len(tags['tags']) == 2 assert u'foo' in tags['tags'] assert u'bar' in tags['tags']
def test_get_tags_error_handling(): with pytest.raises(exceptions.AssertionError): mpsinfo.get_tags(os.path.join(common.TESTS, 'foo'), os.path.join(common.TESTS, 'bar'))
def test_get_tags_error_handling(): with pytest.raises(exceptions.AssertionError): mpsinfo.get_tags(os.path.join(common.TESTS, "foo"), os.path.join(common.TESTS, "bar"))