bugtests.test330.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython-standalone Show documentation
Show all versions of jython-standalone Show documentation
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
"""
[ #477793 ] os.utime() is missing
"""
import support
import os
f = open("test330.out", "w")
f.close()
m = os.stat("test330.out")[8]
os.utime("test330.out", (0, 0))
if os.stat("test330.out")[8] != 0:
raise support.TestWarning("Modification time not changed #1")
os.utime("test330.out", (m, m))
if os.stat("test330.out")[8] != m:
raise support.TestError("Modification time not changed #2")