client = <FlaskClient <Flask 'swh.graphql.tests.conftest'>>
def test_get_directory_entry(client):
directory = get_directories()[1]
storage = server.get_storage()
query_str = """
{
directoryEntry(swhid: "%s", path: "%s") {
name {
text
}
targetType
target {
...on Content {
swhid
}
...on Directory {
swhid
}
}
}
}
"""
for entry in storage.directory_ls(directory.id, recursive=True):
if entry["type"] == "rev":
# FIXME, Revision is not supported as a directory entry target yet
continue
query = query_str % (
directory.swhid(),
entry["name"].decode(),
)
data, _ = utils.get_query_response(
client,
query,
)
if entry["type"] == "file":
swhid = CoreSWHID(
object_type=ObjectType.CONTENT, object_id=entry["sha1_git"]
)
elif entry["type"] == "dir":
import pdb
pdb.set_trace()
> swhid = CoreSWHID(
object_type=ObjectType.DIRECTORY, object_id=entry["target"]
)
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory_entry.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory_entry.py:81: in test_get_directory_entry
swhid = CoreSWHID(
/usr/lib/python3.7/bdb.py:88: in trace_dispatch
return self.dispatch_line(frame)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.debugging.pytestPDB._get_pdb_wrapper_class.<locals>.PytestPdbWrapper object at 0x7fc7006d1908>
frame = <frame at 0x174f498, file '/var/lib/jenkins/workspace/DGQL/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/graphql/tests/functional/test_directory_entry.py', line 81, code test_get_directory_entry>
def dispatch_line(self, frame):
"""Invoke user function and return trace function for line event.
If the debugger stops on the current line, invoke
self.user_line(). Raise BdbQuit if self.quitting is set.
Return self.trace_dispatch to continue tracing in this scope.
"""
if self.stop_here(frame) or self.break_here(frame):
self.user_line(frame)
> if self.quitting: raise BdbQuit
E bdb.BdbQuit
/usr/lib/python3.7/bdb.py:113: BdbQuit
TEST RESULT
TEST RESULT
- Run At
- Sep 9 2022, 8:46 AM