Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Sep 30, 2024
1 parent 1422944 commit 7e9ab1c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tests/unit/contracts/graph/test_nodes.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from argparse import Namespace
import pickle
import re
from dataclasses import replace
Expand All @@ -24,6 +25,13 @@
)


@pytest.fixture
def args_for_flags() -> Namespace:
return Namespace(
state_modified_compare_vars=False
)


def norm_whitespace(string):
_RE_COMBINE_WHITESPACE = re.compile(r"\s+")
string = _RE_COMBINE_WHITESPACE.sub(" ", string).strip()
Expand Down
6 changes: 4 additions & 2 deletions tests/unit/contracts/graph/test_nodes_parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@


@pytest.fixture
def flags_for_args() -> Namespace:
return Namespace(SEND_ANONYMOUS_USAGE_STATS=False)
def args_for_flags() -> Namespace:
return Namespace(
send_anonymous_usage_stats=False, state_modified_compare_vars=False
)


@pytest.fixture
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/graph/test_selector_methods.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from argparse import Namespace
import copy
from dataclasses import replace
from pathlib import Path
Expand Down Expand Up @@ -643,6 +644,10 @@ def previous_state(manifest):
return create_previous_state(manifest)


@pytest.fixture
def args_for_flags():
return Namespace(state_modified_compare_vars=False)

def add_node(manifest, node):
manifest.nodes[node.unique_id] = node

Expand Down

0 comments on commit 7e9ab1c

Please sign in to comment.