diff --git a/src/newcrawler/crawl.py b/src/newcrawler/crawl.py index 7097c34fabd7f85ca73c938f5e3d87e37e390a69..6cf0ea9d09b349992380b3bd817cb97462108a28 100644 --- a/src/newcrawler/crawl.py +++ b/src/newcrawler/crawl.py @@ -204,9 +204,6 @@ class Crawler(object): for i in reversed(range(len(updateList))): record = updateList[i] - if record.parents[0].name == "Measurement": - breakpoint() - # resolve references first: self.identifiableAdapter.resolve_references(record) identifiable = self.identifiableAdapter.retrieve_identifiable(record) diff --git a/unittests/test_tool.py b/unittests/test_tool.py index e56644611decdd52f1b98034aa93d5bc1662b8e6..7c8c2bbad37e5d08a9abd87895be911209ff32ef 100755 --- a/unittests/test_tool.py +++ b/unittests/test_tool.py @@ -12,13 +12,9 @@ import yaml import caosdb as db from caosdb.apiutils import compare_entities +import pytest from pytest import raises -# Some notes: -# Track provenance information in two ways: -# - DONE: provenance in structure elements and converters for properties of records -# - TODO: list whether information from structure elements and converters was used - def rfp(*pathcomponents): """ @@ -35,6 +31,13 @@ def dircheckstr(*pathcomponents): return "newcrawler.structure_elements.Directory: " + basename(join(*pathcomponents)) + ", " + rfp("test_directories", "examples_article", *pathcomponents) +@pytest.fixture +def crawler(): + crawler = Crawler(debug=True) + crawler.crawl_directory(rfp("test_directories", "examples_article"), + rfp("scifolder_cfood.yml")) + + def test_crawler(): crawler = Crawler(debug=True) crawler.crawl_directory(rfp("test_directories", "examples_article"), @@ -294,7 +297,6 @@ def test_crawler_update_list(): assert len(comp[1]["properties"]) == 0 insl, updl = crawler.synchronize(crawler.updateList) - breakpoint() assert len(insl) == 0 assert len(updl) == 0