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

Commit 5b3a970

Browse files
sudharsana-kjlpdxjohnny
authored andcommitted
util: testing: FileSourceTest fix random call
1 parent e355e86 commit 5b3a970

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

dffml/util/testing/source.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
class SourceTest(abc.ABC):
1313
"""
14-
Test case class used to test a Source implementation. Subclass from and set
15-
the SOURCE property to run tests on that source.
14+
Test case class used to test a Source implementation. Subclass from and
15+
implement the setUpSource method.
1616
1717
>>> from dffml.source.file import FileSourceConfig
1818
>>> from dffml.source.json import JSONSource
@@ -95,8 +95,7 @@ async def test_update(self):
9595

9696
class FileSourceTest(SourceTest):
9797
"""
98-
Test case class used to test a Source implementation. Subclass from and set
99-
the SOURCE property to run tests on that source.
98+
Test case class used to test a FileSource implementation.
10099
101100
>>> from dffml.source.file import FileSourceConfig
102101
>>> from dffml.source.json import JSONSource
@@ -110,7 +109,7 @@ class FileSourceTest(SourceTest):
110109
async def test_update(self):
111110
with tempfile.TemporaryDirectory() as testdir:
112111
with self.subTest(extension=None):
113-
self.testfile = os.path.join(testdir, str(random.random))
112+
self.testfile = os.path.join(testdir, str(random.random()))
114113
await super().test_update()
115114
for extension in ["xz", "gz", "bz2", "lzma", "zip"]:
116115
with self.subTest(extension=extension):
@@ -121,7 +120,7 @@ async def test_update(self):
121120

122121
async def test_label(self):
123122
with tempfile.TemporaryDirectory() as testdir:
124-
self.testfile = os.path.join(testdir, str(random.random))
123+
self.testfile = os.path.join(testdir, str(random.random()))
125124
unlabeled = await self.setUpSource()
126125
labeled = await self.setUpSource()
127126
labeled.config = labeled.config._replace(label="somelabel")

0 commit comments

Comments
 (0)