2323# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
2424# Boston, MA 02110-1301, USA.
2525
26- # Standard Library
2726import binascii
2827import os
29- from pathlib import Path
28+ import pathlib
3029import sys
3130import tempfile
31+
3232import pytest
3333
3434import pygit2
@@ -160,7 +160,7 @@ def test_expand_id(barerepo):
160160 assert commit_sha == expanded
161161
162162
163- @utils .refcount
163+ @utils .requires_refcount
164164def test_lookup_commit_refcount (barerepo ):
165165 start = sys .getrefcount (barerepo )
166166 commit_sha = '5fe808e8953c12735680c257f56600cb0de44b10'
@@ -173,7 +173,7 @@ def test_lookup_commit_refcount(barerepo):
173173def test_get_path (barerepo_path ):
174174 barerepo , path = barerepo_path
175175
176- directory = Path (barerepo .path ).resolve ()
176+ directory = pathlib . Path (barerepo .path ).resolve ()
177177 assert directory == path .resolve ()
178178
179179
@@ -199,7 +199,7 @@ def test_hashfile(barerepo):
199199 with os .fdopen (handle , 'w' ) as fh :
200200 fh .write (data )
201201 hashed_sha1 = pygit2 .hashfile (tempfile_path )
202- Path (tempfile_path ).unlink ()
202+ pathlib . Path (tempfile_path ).unlink ()
203203 written_sha1 = barerepo .create_blob (data )
204204 assert hashed_sha1 == written_sha1
205205
0 commit comments