From 0b19dea708a7552ba40ec0a99c9264708c7576a2 Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sun, 24 Feb 2019 06:14:23 +0100 Subject: [PATCH] test will run on Windoze, too --- test/minimail.py | 4 +++- test/sync_test.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/minimail.py b/test/minimail.py index 75b6635..a8ab7f9 100644 --- a/test/minimail.py +++ b/test/minimail.py @@ -6,13 +6,15 @@ # this file is under GNU General Public License 3.0 +import pathlib import pEp from secrets import token_urlsafe def send(msg): name = token_urlsafe(16) + ".eml" - with open("../TestInbox/" + name, "wb") as f: + parent = pathlib.Path("..") + with open(parent / "TestInbox" / name, "wb") as f: f.write(str(msg).encode()) diff --git a/test/sync_test.py b/test/sync_test.py index ca5f16d..a29efc2 100644 --- a/test/sync_test.py +++ b/test/sync_test.py @@ -5,10 +5,9 @@ # this file is under GNU General Public License 3.0 -# this test is only running on POSIX systems - -import os, pathlib +import os +import pathlib def test_for(path):