mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Begin incorporating Python unit tests into build
We now build a separate APE binary for each test so they can run in parallel. We've got 148 tests running fast and stable so far.
This commit is contained in:
parent
51904e2687
commit
b5f743cdc3
121 changed files with 4995 additions and 4767 deletions
10
third_party/python/Lib/test/test_stat.py
vendored
10
third_party/python/Lib/test/test_stat.py
vendored
|
@ -6,6 +6,9 @@ from test.support import TESTFN, import_fresh_module
|
|||
c_stat = import_fresh_module('stat', fresh=['_stat'])
|
||||
py_stat = import_fresh_module('stat', blocked=['_stat'])
|
||||
|
||||
assert c_stat
|
||||
assert py_stat
|
||||
|
||||
class TestFilemode:
|
||||
statmod = None
|
||||
|
||||
|
@ -85,9 +88,10 @@ class TestFilemode:
|
|||
|
||||
def get_mode(self, fname=TESTFN, lstat=True):
|
||||
if lstat:
|
||||
st_mode = os.lstat(fname).st_mode
|
||||
st_mode = os.lstat(fname).st_mode
|
||||
else:
|
||||
st_mode = os.stat(fname).st_mode
|
||||
print('ugh',self.statmod)
|
||||
modestr = self.statmod.filemode(st_mode)
|
||||
return st_mode, modestr
|
||||
|
||||
|
@ -232,3 +236,7 @@ class TestFilemodePyStat(TestFilemode, unittest.TestCase):
|
|||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
if __name__ == 'PYOBJ.COM':
|
||||
import stat
|
||||
import _stat
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue