Skip to content

Commit e54e520

Browse files
committed
fix tests directory shouldn't have init.py
The tests directory shouldn't have an init.py and the imports into your package should just use the package name not "src.packagename". See: https://docs.pytest.org/en/7.1.x/explanation/goodpractices.html#tests-outside-application-code
1 parent a05af8a commit e54e520

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

tests/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/test_algorithm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import random
2-
from src.thread.utils import algorithm
2+
3+
from thread.utils import algorithm
34

45

56
def test_chunking_1():

tests/test_decorator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import time
2-
from src.thread import threaded, processor
2+
3+
from thread import threaded, processor
34

45

56
# >>>>>>>>>> Dummy Functions <<<<<<<<<< #

tests/test_parallelprocessing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import time
2+
23
import pytest
3-
from src.thread import ParallelProcessing, exceptions
4+
5+
from thread import ParallelProcessing, exceptions
46

57

68
# >>>>>>>>>> Dummy Functions <<<<<<<<<< #

tests/test_thread.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import time
2+
23
import pytest
3-
from src.thread import Thread, exceptions
4+
5+
from thread import Thread, exceptions
46

57

68
# >>>>>>>>>> Dummy Functions <<<<<<<<<< #

0 commit comments

Comments
 (0)