aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2023-04-18 13:26:06 +0200
committerMatěj Cepl <mcepl@cepl.eu>2023-04-18 13:50:55 +0200
commit5987bfb838db2c82f00d134c6d987226ffab3eb5 (patch)
treef233605bf0aad9d2cb3506ea40ddf4372067d1c2
parented8f0f2e0c384f03c67be2ab6712ca44c98cfcd1 (diff)
downloadnntplib-pythonpath_fix.tar.gz
ci: Make sure we use our version of nntplib, not the stdlib one.pythonpath_fix
-rw-r--r--.builds/fedora.yml1
-rw-r--r--tests/test_nntplib.py9
2 files changed, 9 insertions, 1 deletions
diff --git a/.builds/fedora.yml b/.builds/fedora.yml
index 26c2a1e..1d54485 100644
--- a/.builds/fedora.yml
+++ b/.builds/fedora.yml
@@ -7,5 +7,6 @@ sources:
tasks:
- test: |
cd nntplib
+ export PYTHONPATH=$(readlink -f .)
python3 -munittest discover -v tests
diff --git a/tests/test_nntplib.py b/tests/test_nntplib.py
index 4f05921..24f12f2 100644
--- a/tests/test_nntplib.py
+++ b/tests/test_nntplib.py
@@ -1,6 +1,7 @@
import io
import socket
import datetime
+import logging
import textwrap
import unittest
import functools
@@ -34,6 +35,11 @@ else:
# - test error conditions
# - test auth and `usenetrc`
+logging.basicConfig(format = '%(asctime)s %(module)s %(levelname)s: %(message)s',
+ level = logging.INFO)
+logger = logging.getLogger(__name__)
+logger.info(f'Using nntplib from {nntplib.__file__}.')
+
class NetworkedNNTPTestsMixin:
@@ -317,7 +323,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase):
DESC = 'Python'
NNTP_CLASS = NNTP
-
+
@classmethod
def setUpClass(cls):
support.requires("network")
@@ -1644,4 +1650,5 @@ class LocalServerTests(unittest.TestCase):
if __name__ == "__main__":
+ log
unittest.main()