Skip to content

Commit

Permalink
CT-710 fix test graph selection (#5324)
Browse files Browse the repository at this point in the history
* Fix test_graph_selection so it can run separately

* Changie
  • Loading branch information
gshank authored Jun 1, 2022
1 parent 74662d1 commit 189c06d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
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

0 comments on commit 189c06d

Please sign in to comment.