# mceditlib.test.session_lock_test — mceditlib 0.1 documentation

### Navigation

- index
- modules |
- mceditlib 0.1 documentation »
- Module code »

# Source code for mceditlib.test.session_lock_test

    from mceditlib.anvil.adapter import SessionLockLost
    from mceditlib.worldeditor import WorldEditor
    from templevel import TempLevel
    import unittest

    class SessionLockTest(unittest.TestCase):
        def test_session_lock(self):
            temp = TempLevel("AnvilWorld")
            level = temp
            level2 = WorldEditor(level.filename, resume=False)
            def touch():
                level.saveChanges()
            self.assertRaises(SessionLockLost, touch)

### Navigation

- index
- modules |
- mceditlib 0.1 documentation »
- Module code »