Use path_to_file_uri to fix the test on Windows.

This commit is contained in:
Andrey Rakhmatullin 2023-10-03 16:47:03 +04:00
parent 60d5f391c4
commit fb4debda04
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ class FileTestCase(unittest.TestCase):
return self.download_request(request, Spider("foo")).addCallback(_test)
def test_non_existent(self):
request = Request(f"file://{self.mktemp()}")
request = Request(path_to_file_uri(self.mktemp()))
d = self.download_request(request, Spider("foo"))
return self.assertFailure(d, OSError)