Remove some remaining nosetest import
`nose_tst_earl_report` is no longer used but I forgot to remove it in
the nosetest to pytest migration.
@@ -28,7 +28,6 @@ from traceback import print_exc
from threading import Thread
from http.server import BaseHTTPRequestHandler, HTTPServer, SimpleHTTPRequestHandler
import email.message
-from nose import SkipTest
import unittest
from rdflib import BNode, Graph, ConjunctiveGraph
@@ -96,59 +95,6 @@ def _parse_or_report(verbose, graph, *args, **kwargs):
raise
-def nose_tst_earl_report(generator, earl_report_name=None):
- from optparse import OptionParser
-
- p = OptionParser()
- (options, args) = p.parse_args()
-
- skip = 0
- tests = 0
- success = 0
-
- for t in generator(args):
- tests += 1
- print("Running ", t[1].uri)
- try:
- t[0](t[1])
- add_test(t[1].uri, "passed")
- success += 1
- except SkipTest as e:
- add_test(t[1].uri, "untested", e.message)
- print("skipping %s - %s" % (t[1].uri, e.message))
- skip += 1
-
- except KeyboardInterrupt:
- raise
- except AssertionError:
- add_test(t[1].uri, "failed")
- except:
- add_test(t[1].uri, "failed", "error")
- print_exc()
- sys.stderr.write("%s\n" % t[1].uri)
-
- print(
- "Ran %d tests, %d skipped, %d failed. " % (tests, skip, tests - skip - success)
- )
- if earl_report_name:
- now = isodate.datetime_isoformat(datetime.datetime.utcnow())
- earl_report = os.path.join(
- TEST_DIR,
- "../test_reports/%s-%s.ttl"
- % (
- earl_report_name,
- now.replace(":", ""),
- ),
- )
-
- report.serialize(earl_report, format="n3")
- report.serialize(
- os.path.join(TEST_DIR, "../test_reports/%s-latest.ttl" % earl_report_name),
- format="n3",
- )
- print("Wrote EARL-report to '%s'" % earl_report)
-
-
def get_random_ip(parts: List[str] = None) -> str:
if parts is None:
parts = ["127"]
