Skip to content

Commit 0325753

Browse files
author
David Erb
committed
comments and cosmetics
1 parent 78b3913 commit 0325753

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/dls_servbase_lib/datafaces/normsql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ class Normsql(Thing):
2121
def __init__(self, specification=None):
2222
Thing.__init__(self, thing_type, specification)
2323

24+
# For testing, caller might want to drop the database on connection.
2425
self.__should_drop_database = specification.get("should_drop_database")
26+
2527
self.__database = None
2628

2729
# ----------------------------------------------------------------------------------------
@@ -43,6 +45,8 @@ async def establish_database_connection(self):
4345
self.specification()["database"],
4446
DatabaseDefinition(),
4547
)
48+
49+
# For testing, caller might want to drop the database on connection.
4650
await self.__database.connect(
4751
should_drop_database=self.__should_drop_database
4852
)

tests/test_database.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ def test(self, constants, logging_setup, output_directory):
2121

2222
database_specification = {
2323
"type": ClassTypes.AIOSQLITE,
24-
"filename": "%s/dls_servbase_scheduler.sqlite" % (output_directory),
24+
"filename": "%s/dls_servbase_pytest.sqlite" % (output_directory),
2525
}
2626

2727
# Test direct SQL access to the database.
28-
DatabaseTesterImage().main(
28+
DatabaseTester().main(
2929
constants,
3030
database_specification,
3131
output_directory,
@@ -53,15 +53,15 @@ def test(self, constants, logging_setup, output_directory):
5353
}
5454

5555
# Test direct SQL access to the database.
56-
DatabaseTesterImage().main(
56+
DatabaseTester().main(
5757
constants,
5858
database_specification,
5959
output_directory,
6060
)
6161

6262

6363
# ----------------------------------------------------------------------------------------
64-
class DatabaseTesterImage(BaseTester2):
64+
class DatabaseTester(BaseTester2):
6565
"""
6666
Test direct SQL access to the database.
6767
"""

0 commit comments

Comments
 (0)