Files
SpacetimeDB/smoketests/tests/create_project.py
Noa 540c519002 Rewrite smoketests as python unittests (#692)
* Rewrite smoketests as python unittests

* Get all tests working and do some work on parallel unittest

* Give up on parallel unittests

* Fix CI + address comments

* Fix skip-clippy arg confusion (just use the env var)

* fix ci

* Add comments
2024-03-14 02:47:38 +00:00

18 lines
662 B
Python

from .. import spacetime
import unittest
import tempfile
class CreateProject(unittest.TestCase):
def test_create_project(self):
"""
Ensure that the CLI is able to create a local project. This test does not depend on a running spacetimedb instance.
"""
with tempfile.TemporaryDirectory() as tmpdir:
with self.assertRaises(Exception):
spacetime("init")
with self.assertRaises(Exception):
spacetime("init", tmpdir)
spacetime("init", "--lang=rust", tmpdir)
with self.assertRaises(Exception):
spacetime("init", "--lang=rust", tmpdir)