From 20baf284341555803d800ec4c248fd0f1b5351f1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 24 Oct 2021 09:53:53 -0400 Subject: refactor(test): os_sep and remove_tree helpers --- tests/test_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_python.py') diff --git a/tests/test_python.py b/tests/test_python.py index 5965ca06..a8288613 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -3,7 +3,6 @@ """Tests of coverage/python.py""" -import os import sys import pytest @@ -12,6 +11,7 @@ from coverage import env from coverage.python import get_zip_bytes, source_for_file from tests.coveragetest import CoverageTest +from tests.helpers import os_sep class GetZipBytesTest(CoverageTest): @@ -28,7 +28,7 @@ class GetZipBytesTest(CoverageTest): zip_file = "tests/zipmods.zip" sys.path.append(zip_file) # So we can import the files. filename = zip_file + "/encoded_" + encoding + ".py" - filename = filename.replace("/", os.sep) + filename = os_sep(filename) zip_data = get_zip_bytes(filename) zip_text = zip_data.decode(encoding) assert 'All OK' in zip_text -- cgit v1.2.1