Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 18, 2024
1 parent e47b043 commit cab7aaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions bbot/test/bbot_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ class bbot_events:
return bbot_events


# @pytest.fixture(scope="session", autouse=True)
# def install_all_python_deps():
# deps_pip = set()
# for module in DEFAULT_PRESET.module_loader.preloaded().values():
# deps_pip.update(set(module.get("deps", {}).get("pip", [])))
@pytest.fixture(scope="session", autouse=True)
def install_all_python_deps():
deps_pip = set()
for module in DEFAULT_PRESET.module_loader.preloaded().values():
deps_pip.update(set(module.get("deps", {}).get("pip", [])))

# constraint_file = tempwordlist(get_python_constraints())
constraint_file = tempwordlist(get_python_constraints())

# subprocess.run([sys.executable, "-m", "pip", "install", "--constraint", constraint_file] + list(deps_pip))
subprocess.run([sys.executable, "-m", "pip", "install", "--constraint", constraint_file] + list(deps_pip))
6 changes: 4 additions & 2 deletions bbot/test/test_step_1/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,10 @@ async def test_filesystem():
scan = Scanner("FILESYSTEM:/tmp/asdf")
events = [e async for e in scan.async_start()]
assert len(events) == 3
assert events[1].type == "FILESYSTEM"
assert events[1].data == {"path": "/tmp/asdf"}
filesystem_events = [e for e in events if e.type == "FILESYSTEM"]
assert len(filesystem_events) == 1
assert filesystem_events[0].type == "FILESYSTEM"
assert filesystem_events[0].data == {"path": "/tmp/asdf"}


def test_event_hashing():
Expand Down

0 comments on commit cab7aaa

Please sign in to comment.