This repository has been archived on 2024-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
mcedit2/tests/mceditlib/session_lock_test.py

15 lines
445 B
Python

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)