def test_unix_etc_timezone_dir(): # Should not fail if `/etc/timezone` is a folder local_path = os.path.join(os.path.split(__file__)[0], "..") root_path = os.path.join(local_path, "fixtures", "tz", "timezone_dir") tz = _get_unix_timezone(_root=root_path) assert tz.name == "Europe/Paris"
def test_unix_clock(): # A ZONE setting in the target path of a symbolic linked localtime, # f ex systemd distributions local_path = os.path.join(os.path.split(__file__)[0], "..") tz = _get_unix_timezone(_root=os.path.join(local_path, "fixtures", "tz", "clock")) assert tz.name == "Europe/Zurich"
def test_unix_symlink(): # A ZONE setting in the target path of a symbolic linked localtime, # f ex systemd distributions local_path = os.path.join(os.path.split(__file__)[0], '..') tz = _get_unix_timezone( _root=os.path.join(local_path, 'fixtures', 'tz', 'symlink')) assert tz.name == 'Europe/Paris'
def test_unix_clock(): # A ZONE setting in the target path of a symbolic linked localtime, # f ex systemd distributions local_path = os.path.join(os.path.split(__file__)[0], "..") tz = _get_unix_timezone( _root=os.path.join(local_path, "fixtures", "tz", "clock")) assert tz.name == "Europe/Zurich"