X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Ftests%2Fselftest.py;h=bb19d331ff347f72031a432934c01e0be89c6f8c;hp=c6f339866011342f65a91f9bb84fa264c8981039;hb=a75fa6326ef030ad1dbbe25171c75180f93e657c;hpb=d1362ea83d4d7eae9dd786109c02224928b2bf01 diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index c6f3398..bb19d33 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -477,9 +477,7 @@ def start_service(config): # Clean up any previous test output for f in pathlib.Path(".").glob("capture_*.log"): - # have to use .name here since remove() doesn't support passing a - # PosixPath argument until Python3.6 - os.remove(f.name) + os.remove(f) for d in ("data", "var"): shutil.rmtree(d, ignore_errors=True) @@ -488,7 +486,7 @@ def start_service(config): stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(1) - return(service) + return service def stop_service(service): @@ -496,7 +494,7 @@ def stop_service(service): # The no-op case when no service was started if service is None: - return(success) + return success # This handles when the service is running as a direct child process service.terminate() @@ -530,7 +528,7 @@ def stop_service(service): with open("capture_stderr.log", "w") as serviceerr: serviceerr.write(stderr.decode("utf-8")) - return(success) + return success def tlog(message, quiet=False):