Пример #1
0
class TestSyntheticCheckout:
    # noinspection PyAttributeOutsideInit
    def setup(self):
        self.checkouts_path = mkdtemp(prefix="mubench-checkout-local_")

        self.uut = SyntheticProjectCheckout(self.checkouts_path, "-project-",
                                            "-id-")

    def test_exists_always(self):
        assert not self.uut.exists()

    def test_create_passes(self):
        self.uut.create()

        assert exists(self.uut.checkout_dir)

    def test_delete_passes(self):
        os.makedirs(self.uut.checkout_dir)

        self.uut.delete()

        assert not exists(self.uut.checkout_dir)

    def test_to_string(self):
        assert_equals("synthetic:-project-.-id-", str(self.uut))
Пример #2
0
    def setup(self):
        self.checkouts_path = mkdtemp(prefix="mubench-checkout-local_")

        self.uut = SyntheticProjectCheckout(self.checkouts_path, "-project-", "-id-")