mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #2589 from oulenz/test_server
Replace `os.mknod` with `open` for macOS and Windows compatibility
This commit is contained in:
commit
7c63cb5231
1 changed files with 3 additions and 3 deletions
|
|
@ -35,12 +35,12 @@ class TestServer(unittest.TestCase):
|
||||||
self.server)
|
self.server)
|
||||||
handler.base_path = self.temp_output
|
handler.base_path = self.temp_output
|
||||||
|
|
||||||
os.mknod(os.path.join(self.temp_output, 'foo.html'))
|
open(os.path.join(self.temp_output, 'foo.html'), 'a').close()
|
||||||
os.mkdir(os.path.join(self.temp_output, 'foo'))
|
os.mkdir(os.path.join(self.temp_output, 'foo'))
|
||||||
os.mknod(os.path.join(self.temp_output, 'foo', 'index.html'))
|
open(os.path.join(self.temp_output, 'foo', 'index.html'), 'a').close()
|
||||||
|
|
||||||
os.mkdir(os.path.join(self.temp_output, 'bar'))
|
os.mkdir(os.path.join(self.temp_output, 'bar'))
|
||||||
os.mknod(os.path.join(self.temp_output, 'bar', 'index.html'))
|
open(os.path.join(self.temp_output, 'bar', 'index.html'), 'a').close()
|
||||||
|
|
||||||
os.mkdir(os.path.join(self.temp_output, 'baz'))
|
os.mkdir(os.path.join(self.temp_output, 'baz'))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue