Example #1
0
def test_python_int():
    obj1 = 42
    filename = path("temp.py")
    saver = GenericSaver()
    saver.save(obj1, filename)
    loader = PythonLoader()
    obj2 = loader.load(filename)
    assert obj1 == obj2

    if filename.exists():
        os.remove(filename)
def test_python_int():
    obj1 = 42
    filename = path("temp.py")
    saver = GenericSaver()
    saver.save(obj1, filename)
    loader = PythonLoader()
    obj2 = loader.load(filename)
    assert obj1 == obj2

    if filename.exists():
        os.remove(filename)
Example #3
0
def test_python_dict():
    obj1 = {'test1': True, 'test2': 42, 'test3': 'ok'}
    filename = path("temp.py")
    saver = GenericSaver()
    saver.save(obj1, filename)
    loader = PythonLoader()
    obj2 = loader.load(filename)
    assert obj1 == obj2

    if filename.exists():
        os.remove(filename)
def test_python_dict():
    obj1 = {'test1': True, 'test2': 42, 'test3': 'ok'}
    filename = path("temp.py")
    saver = GenericSaver()
    saver.save(obj1, filename)
    loader = PythonLoader()
    obj2 = loader.load(filename)
    assert obj1 == obj2

    if filename.exists():
        os.remove(filename)