Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overwrite an output file with -O, (FeedExporter updated) #4859

Merged
merged 4 commits into from Oct 30, 2020

Conversation

GeorgeA92
Copy link
Contributor

@GeorgeA92 GeorgeA92 commented Oct 28, 2020

related to #4857 and #4845

FeedExporter._get_storage() updated - feed_options successfully passed to Storage objects

CrawlCommandTest.test_overwrite_output and
RunSpiderCommandTest.test_overwrite_output aimed to test -O arg - updated.

@codecov
Copy link

codecov bot commented Oct 29, 2020

Codecov Report

Merging #4859 into master will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4859   +/-   ##
=======================================
  Coverage   87.86%   87.86%           
=======================================
  Files         160      160           
  Lines        9749     9749           
  Branches     1439     1439           
=======================================
  Hits         8566     8566           
  Misses        926      926           
  Partials      257      257           
Impacted Files Coverage Δ
scrapy/extensions/feedexport.py 95.22% <100.00%> (ø)

@@ -680,9 +680,14 @@ def start_requests(self):
)
return []
"""
with open(os.path.join(self.cwd, "example.json"), "w") as file:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file is a built-in in Python, should we change it to something like fp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I renamed it.

kmike
kmike approved these changes Oct 29, 2020
Copy link
Member

@kmike kmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the fix and the tests @GeorgeA92!

@Gallaecio Gallaecio merged commit a5872a0 into scrapy:master Oct 30, 2020
2 checks passed
@Gallaecio
Copy link
Member

Thank you!

@wRAR
Copy link
Contributor

wRAR commented Nov 2, 2020

This didn't close the linked issues, is there anything else needed for them?

@Gallaecio
Copy link
Member

I believe we simply forgot to set the pull request description to do it. Both are closed now.

@GeorgeA92 GeorgeA92 deleted the issue_4857 branch January 10, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants