Skip to content

Commit

Permalink
TST: don't import from another test with pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Jevnik committed Jul 7, 2015
1 parent 8b4ca15 commit 581e5c5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions blaze/compute/tests/test_postgresql_compute.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import itertools
from datetime import timedelta
import itertools
import re

import pytest

Expand All @@ -14,12 +15,16 @@
from odo import odo, resource, drop, discover
from blaze import symbol, compute, concat

from blaze.compute.tests.test_sql_compute import normalize


names = ('tbl%d' % i for i in itertools.count())


def normalize(s):
s = ' '.join(s.strip().split()).lower()
s = re.sub(r'(alias)_?\d*', r'\1', s)
return re.sub(r'__([A-Za-z_][A-Za-z_0-9]*)', r'\1', s)


@pytest.fixture
def url():
return 'postgresql://postgres@localhost/test::%s' % next(names)
Expand Down

0 comments on commit 581e5c5

Please sign in to comment.