aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2023-05-25 10:15:47 +0200
committerMatěj Cepl <mcepl@cepl.eu>2023-05-25 11:01:18 +0200
commitec4b49d843e67b31b33ac81bef55346353f1d04c (patch)
tree5f60ffae4d6ebe180c5ee4d51d468bf154535251 /test
parent8006d981ce26fe8c1140e33b9476c08470d59f30 (diff)
downloadpyg-ec4b49d843e67b31b33ac81bef55346353f1d04c.tar.gz
refactor: rearrange the project to the src/ layout.0.10.3
Fix also pyproject.toml to generate what seems right. Add the explicit dependency on nntplib for Python >= 3.12 (gh#python/cpython!104894). Fixes: https://todo.sr.ht/~mcepl/pygn/7
Diffstat (limited to 'test')
-rw-r--r--test/test_pyg.py4
-rw-r--r--test/whitelist-pygn2m3
2 files changed, 5 insertions, 2 deletions
diff --git a/test/test_pyg.py b/test/test_pyg.py
index 7a4e48a..6044520 100644
--- a/test/test_pyg.py
+++ b/test/test_pyg.py
@@ -30,7 +30,7 @@ one line test
def test_m2n(self):
with open('examples/mail') as in_mail:
- pid = subprocess.Popen(['python', 'pygm2n', '-Tv', '-n', 'pyg.test'],
+ pid = subprocess.Popen([sys.executable, 'src/mail2news.py', '-Tv', '-n', 'pyg.test'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
universal_newlines=True)
@@ -61,7 +61,7 @@ Resent-Sender: sender@example.com
def test_n2m(self):
with open('examples/articletest.accepted') as in_mail:
- pid = subprocess.Popen(['python', 'pygn2m', '-Tvt', 'test@example.com',
+ pid = subprocess.Popen([sys.executable, 'src/news2mail.py', '-Tvt', 'test@example.com',
'-s', 'sender@example.com',
'-w', 'examples/whitelist.example'],
stdin=subprocess.PIPE,
diff --git a/test/whitelist-pygn2m b/test/whitelist-pygn2m
new file mode 100644
index 0000000..33044bc
--- /dev/null
+++ b/test/whitelist-pygn2m
@@ -0,0 +1,3 @@
+<ceplm@seznam.cz> {
+ From: = 'ceplm@seznam.cz'
+}