Skip to content

Commit

Permalink
Merge pull request #6290 from Gallaecio/fix-skips
Browse files Browse the repository at this point in the history
Fix WindowsRunSpiderCommandTest skip outside Windows for older Twisted
  • Loading branch information
wRAR committed Mar 12, 2024
2 parents d7581c6 + e72de11 commit 95a70d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,14 @@ def start_requests(self):
self.assertIn("The value of FOO is 42", log)


@skipIf(platform.system() != "Windows", "Windows required for .pyw files")
class WindowsRunSpiderCommandTest(RunSpiderCommandTest):
spider_filename = "myspider.pyw"

def setUp(self):
if platform.system() != "Windows":
raise unittest.SkipTest("Windows required for .pyw files")
return super().setUp()

def test_start_requests_errors(self):
log = self.get_log(self.badspider, name="badspider.pyw")
self.assertIn("start_requests", log)
Expand Down

0 comments on commit 95a70d3

Please sign in to comment.