Skip to content

Commit 5010406

Browse files
committed
fix: several imports errors to make it work on CI as well
Signed-off-by: Zvi Grinberg <zgrinber@redhat.com>
1 parent 58cd202 commit 5010406

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/concurrent_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
from concurrent.futures.thread import ThreadPoolExecutor
44

5-
from src.execution import Execution
5+
from execution import Execution
66

77

88
logger = logging.getLogger(__name__)

src/integration_tests_execution.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
import json
1010
import logging
1111

12-
13-
from src.execution import Execution
14-
from src.concurrent_executor import ConcurrentExecutor, ExecutionInput
15-
12+
try:
13+
from .execution import Execution
14+
from .concurrent_executor import ConcurrentExecutor, ExecutionInput
15+
except ImportError:
16+
from execution import Execution
17+
from concurrent_executor import ConcurrentExecutor, ExecutionInput
1618

1719
# Integration tests input file with all tests.
1820
INTEGRATION_TESTS_INPUT_FILE = "scan_it.json"

src/main_integration_tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@
1010
import logging
1111
import sys
1212

13-
from src.integration_tests_execution import IntegrationTestExecution
14-
from src.it_results_interpreter import IntegrationTestsResultsInterpreter
15-
1613
try:
14+
from .integration_tests_execution import IntegrationTestExecution
15+
from .it_results_interpreter import IntegrationTestsResultsInterpreter
1716
from .config import Configuration, GoogleSheetsConfig, GoogleSheetsManager
1817
from .execution import Execution
1918
from .data_extractor import DataExtractor, ITDataExtractor
2019
from .analysis import Analysis, GoogleSheetsDataLoader
2120
from .cleanup import Cleanup
2221
except ImportError:
22+
from integration_tests_execution import IntegrationTestExecution
23+
from it_results_interpreter import IntegrationTestsResultsInterpreter
2324
from config import Configuration, GoogleSheetsConfig
2425
from execution import Execution
2526
from data_extractor import DataExtractor, ITDataExtractor

0 commit comments

Comments
 (0)