Skip to content

Commit

Permalink
tries fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Feb 25, 2024
1 parent d26f233 commit 7fd4502
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/test_indexhtml_scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,7 @@ def testVolumeManagerFromHtml(self):
withStore = False
if withStore:
vm.store()

def testDates(self):
dateFormat = "%d-%b-%Y"
now = datetime.datetime.now()
nows = now.strftime(dateFormat)
print(f"testing {nows} with {dateFormat}")
_pdate = datetime.datetime.strptime(nows, dateFormat)


def testReadingHtml(self):
"""
test reading the HTML file
Expand All @@ -71,8 +64,8 @@ def testReadingHtml(self):
if debug:
logging.basicConfig(level=logging.DEBUG)
vm = VolumeManager()
htmlText = vm.getIndexHtml(force=False)
indexParser = IndexHtmlParser(htmlText, debug=debug)
htmlText = vm.getIndexHtml()
indexParser = IndexHtmlParser(htmlText)
lineCount = len(indexParser.lines)
self.assertTrue(lineCount > 99000)
if debug or self.inPublicCI():
Expand All @@ -82,6 +75,13 @@ def testReadingHtml(self):
volumes = indexParser.parse()
self.checkVolumes(volumes)

def testDates(self):
dateFormat = "%d-%b-%Y"
now = datetime.datetime.now()
nows = now.strftime(dateFormat)
print(f"testing {nows} with {dateFormat}")
_pdate = datetime.datetime.strptime(nows, dateFormat)

def testVolumesAsCsv(self):
"""
test getting volumes from CSV
Expand All @@ -97,7 +97,7 @@ def testReadVolumePages(self):
"""
withStore = False
vm = VolumeManager()
vm.loadFromIndexHtml(force=withStore)
vm.loadFromIndexHtml()
volumesByNumber, _duplicates = LOD.getLookup(vm.getList(), "number")
debug = self.debug or withStore
if self.inPublicCI():
Expand Down

0 comments on commit 7fd4502

Please sign in to comment.