mirror of https://github.com/pwndbg/pwndbg.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
469 B
Python
17 lines
469 B
Python
from __future__ import annotations
|
|
|
|
from pwndbg.lib.functions import functions
|
|
from pwndbg.lib.functions_data import _functions
|
|
|
|
|
|
def test_functions_lookup():
|
|
# test that the lazy loading through __getitem__ works properly
|
|
key1 = next(iter(_functions.keys()))
|
|
assert functions.get(key1) == _functions[key1]
|
|
|
|
|
|
def test_functions_lookup_does_not_exist():
|
|
no_key = object()
|
|
not_found = object()
|
|
assert functions.get(no_key, not_found) is not_found
|