Debian Codegraph @

pypy/module/posix/test/test_nt.py

raw symbols SCIP
1 import os
2 import sys
3
4 import pytest
5
6 if not sys.platform.startswith('win'):
7 pytest.skip("requires Windows")
8
9 from pypy.module.posix import interp_nt as nt
10
11
12 def test__getfileinformation():
13 with open(__file__) as fp:
14 stat = os.fstat(fp.fileno())
15 info = nt._getfileinformation(fp.fileno())
16 serial, high, low = info
17 assert type(serial) in (int, long)
18 assert (high << 32) + low == stat.st_ino
19
20
21 def test__getfinalpathname():
22 path = __file__.decode('utf-8')
23 try:
24 result, lgt = nt._getfinalpathname(path)
25 except nt.LLNotImplemented:
26 pytest.skip("_getfinalpathname not supported on this platform")
27 assert os.path.exists(result)