Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CT-710 fix test graph selection #5324

Merged
merged 2 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220601-112648.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Fix unit test test_graph_selection
time: 2022-06-01T11:26:48.725831-04:00
custom:
Author: gshank
Issue: "5323"
PR: "5324"
4 changes: 2 additions & 2 deletions core/dbt/graph/selector_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import re
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
from dbt.dataclass_schema import StrEnum
from dbt.dataclass_schema import StrEnum, dbtClassMixin

from typing import Set, Iterator, List, Optional, Dict, Union, Any, Iterable, Tuple
from .graph import UniqueId
Expand Down Expand Up @@ -169,7 +169,7 @@ def from_single_spec(
)


class BaseSelectionGroup(Iterable[SelectionSpec], metaclass=ABCMeta):
class BaseSelectionGroup(dbtClassMixin, Iterable[SelectionSpec], metaclass=ABCMeta):
def __init__(
self,
components: Iterable[SelectionSpec],
Expand Down
7 changes: 7 additions & 0 deletions test/unit/test_graph_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

import networkx as nx

from dbt import flags

from argparse import Namespace
from dbt.contracts.project import UserConfig

flags.set_from_args(Namespace(), UserConfig())


def _get_graph():
integer_graph = nx.balanced_tree(2, 2, nx.DiGraph())
Expand Down