Skip to content

Commit 047dd54

Browse files
author
Ezra Peisach
committed
Remove import of common in these tests
1 parent 53fd069 commit 047dd54

File tree

4 files changed

+0
-33
lines changed

4 files changed

+0
-33
lines changed

wwpdb/apps/tests-msgmodule-db/DatabaseIntegrationTests.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,6 @@
1919
import os
2020
from datetime import datetime
2121

22-
if __package__ is None or __package__ == "":
23-
from os import path
24-
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
25-
from commonsetup import TESTOUTPUT, configInfo # pylint: disable=import-error,unused-import
26-
else:
27-
from .commonsetup import TESTOUTPUT, configInfo # noqa: F401
28-
2922
# CRITICAL: Restore real ConfigInfo for database integration tests
3023
# The commonsetup.py mocks ConfigInfo, but we need the real one for database connectivity
3124
if 'wwpdb.utils.config.ConfigInfo' in sys.modules:

wwpdb/apps/tests-msgmodule-db/DumpMessagesTest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
from pathlib import Path
1919
from datetime import datetime
2020

21-
if __package__ is None or __package__ == "":
22-
from os import path
23-
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
24-
from commonsetup import TESTOUTPUT # pylint: disable=import-error,unused-import
25-
else:
26-
from .commonsetup import TESTOUTPUT # noqa: F401
27-
2821
# CRITICAL: Remove the mock ConfigInfo from commonsetup.py before importing anything
2922
# that needs real database configuration (like dump_db_to_cif which uses DataAccessLayer)
3023
if 'wwpdb.utils.config.ConfigInfo' in sys.modules:

wwpdb/apps/tests-msgmodule-db/MessagingIoTests.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
import sys
55
import os # noqa: F401 pylint: disable=unused-import # Need for mock changes
66

7-
if __package__ is None or __package__ == "":
8-
from os import path
9-
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
10-
from commonsetup import TESTOUTPUT # noqa: F401 pylint: disable=import-error,unused-import
11-
else:
12-
from .commonsetup import TESTOUTPUT # noqa: F401
13-
147
# Import the class to test
158
from wwpdb.apps.msgmodule.io.MessagingIo import MessagingIo
169

wwpdb/apps/tests-msgmodule-db/RoundTripTests.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@
1818
from datetime import datetime
1919
from typing import List, Dict
2020

21-
# Setup test path - follow same pattern as other test files
22-
if __package__ is None or __package__ == "":
23-
from os import path
24-
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
25-
from commonsetup import TESTOUTPUT # pylint: disable=import-error,unused-import
26-
else:
27-
from .commonsetup import TESTOUTPUT # noqa: F401
28-
29-
# Remove mock ConfigInfo to allow real database access
30-
if 'wwpdb.utils.config.ConfigInfo' in sys.modules:
31-
del sys.modules['wwpdb.utils.config.ConfigInfo']
32-
3321
try:
3422
import gemmi
3523
except ImportError:

0 commit comments

Comments
 (0)