Skip to content
This repository was archived by the owner on Apr 14, 2024. It is now read-only.

Commit 7cbea63

Browse files
committed
Adjusted module imports to work standalone
1 parent 37fe463 commit 7cbea63

File tree

8 files changed

+25
-19
lines changed

8 files changed

+25
-19
lines changed

test/lib.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""Module with shared tools for testing"""
2+
import unittest
3+
4+
5+
class TestBase(unittest.TestCase):
6+
"""Common base for all tests"""

test/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Module containing task implementations useful for testing them"""
2-
from git.async.task import *
2+
from async.task import *
33

44
import threading
55
import weakref

test/test_channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Channel testing"""
2-
from test.testlib import *
3-
from git.async.channel import *
2+
from lib import *
3+
from async.channel import *
44

55
import time
66

test/test_graph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Channel testing"""
2-
from test.testlib import *
3-
from git.async.graph import *
2+
from lib import *
3+
from async.graph import *
44

55
import time
66
import sys

test/test_performance.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Channel testing"""
2-
from test.testlib import *
2+
from lib import *
33
from task import *
44

5-
from git.async.pool import *
6-
from git.async.thread import terminate_threads
7-
from git.async.util import cpu_count
5+
from async.pool import *
6+
from async.thread import terminate_threads
7+
from async.util import cpu_count
88

99
import time
1010
import sys

test/test_pool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"""Channel testing"""
2-
from test.testlib import *
2+
from lib import *
33
from task import *
44

5-
from git.async.pool import *
6-
from git.async.thread import terminate_threads
7-
from git.async.util import cpu_count
5+
from async.pool import *
6+
from async.thread import terminate_threads
7+
from async.util import cpu_count
88

99
import threading
1010
import weakref

test/test_task.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Channel testing"""
2-
from test.testlib import *
3-
from git.async.util import *
4-
from git.async.task import *
2+
from lib import *
3+
from async.util import *
4+
from async.task import *
55

66
import time
77

test/test_thread.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
""" Test thead classes and functions"""
3-
from test.testlib import *
4-
from git.async.thread import *
3+
from lib import *
4+
from async.thread import *
55
from Queue import Queue
66
import time
77

@@ -25,7 +25,7 @@ def reset(self):
2525
self.arg = None
2626

2727

28-
class TestThreads( TestCase ):
28+
class TestThreads(TestBase):
2929

3030
@terminate_threads
3131
def test_worker_thread(self):

0 commit comments

Comments
 (0)