Skip to content

Commit

Permalink
tests: support for scrapy-crawl-once
Browse files Browse the repository at this point in the history
Addresses inspirehep#161

Signed-off-by: Spiros Delviniotis <[email protected]>
  • Loading branch information
spirosdelviniotis authored and david-caro committed Aug 25, 2017
1 parent 85f4f36 commit dab61e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/functional/arxiv/test_arxiv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from __future__ import absolute_import, division, print_function

import os
from time import sleep
import pytest

Expand All @@ -20,6 +21,7 @@
from hepcrawl.testlib.fixtures import (
get_test_suite_path,
expected_json_results_from_file,
clean_dir,
)


Expand Down Expand Up @@ -51,6 +53,8 @@ def set_up_local_environment():
}
}

clean_dir(path=os.path.join(os.getcwd(), '.scrapy'))


@pytest.mark.parametrize(
'expected_results',
Expand Down
2 changes: 2 additions & 0 deletions tests/functional/wsp/test_wsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def set_up_ftp_environment():
}

clean_dir(path='/tmp/WSP/')
clean_dir(path=os.path.join(os.getcwd(), '.scrapy'))


@pytest.fixture(scope="function")
Expand All @@ -81,6 +82,7 @@ def set_up_local_environment():

def remove_generated_files(package_location):
clean_dir(path='/tmp/WSP/')
clean_dir(path=os.path.join(os.getcwd(), '.scrapy'))

_, dirs, files = next(os.walk(package_location))
for dir_name in dirs:
Expand Down

0 comments on commit dab61e1

Please sign in to comment.