Test suite fails depending on time of day
Test suite fails as follows:
1/4 osinfo-db-tools:style / syntax-check OK 0.037265777587890625 s
2/4 osinfo-db-tools:unit / export-import FAIL 0.7209174633026123 s (exit status (1,))
3/4 osinfo-db-tools:unit / path OK 0.22102952003479004 s
4/4 osinfo-db-tools:unit / validate OK 0.26975035667419434 s
Only fails if I run before 00.00 UTC. After then it's fine. Test is checking for local time but the tool is apparently creating filename based on UTC.
=================================== FAILURES ===================================
_____________________ test_osinfo_db_export_import_system ______________________
def test_osinfo_db_export_import_system():
"""
Test osinfo-db-export --system and osinfo-db-import --system
"""
default_filename = "osinfo-db-%s.tar.xz" % time.strftime("%Y%m%d")
os.environ["OSINFO_SYSTEM_DIR"] = util.Data.positive
cmd = [util.Tools.db_export, util.ToolsArgs.SYSTEM]
returncode = util.get_returncode(cmd)
assert returncode == 0
> assert os.path.isfile(default_filename)
E AssertionError: assert False