def test_eq(): shio = CyShioTime(shio_file) other_shio = CyShioTime(shio_file) assert shio == other_shio other_shio = CyShioTime(shio_file) other_shio.daylight_savings_off = True assert shio != other_shio other_shio = CyShioTime(shio_file) other_shio.scale_factor = 2 assert shio != other_shio
def test_eq(): shio = CyShioTime(shio_file) other_shio = CyShioTime(shio_file) assert shio == other_shio other_shio = CyShioTime(shio_file) other_shio.daylight_savings_off = True assert shio != other_shio other_shio = CyShioTime(shio_file) other_shio.scale_factor = 2 assert shio != other_shio other_shio = CyShioTime(shio_file) yd = os.path.join(os.path.dirname(gnome.__file__), 'data', 'yeardata') other_shio.yeardata = yd assert shio != other_shio
def test_eval_repr(): print "in test_eval_repr: shio_file is:", shio_file shio = CyShioTime(shio_file) print "the repr is:", repr(shio) other_shio = eval(repr(shio)) assert shio == other_shio yd = os.path.join(os.path.dirname(gnome.__file__), 'data', 'yeardata') shio.yeardata = yd other_shio = eval(repr(shio)) assert shio == other_shio shio.daylight_savings_off = False other_shio = eval(repr(shio)) assert shio == other_shio shio.scale_factor = 2 other_shio = eval(repr(shio)) assert shio == other_shio
def test_daylight_savings_off(): shio = CyShioTime(shio_file) assert not shio.daylight_savings_off shio.daylight_savings_off = True assert shio.daylight_savings_off