From 53582de18d02bf50bafa2f91e7207c107279373b Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Sun, 1 May 2016 14:37:27 +0300 Subject: [PATCH] Fix test: clone luarocks only if it's missing --- test/cli_test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cli_test.py b/test/cli_test.py index 7426727..b706cea 100644 --- a/test/cli_test.py +++ b/test/cli_test.py @@ -102,9 +102,12 @@ class TestCLI(unittest.TestCase): def test_install_lua_from_given_git_repo_with_luarocks_from_local_sources(self): local_luarocks = os.path.join("test", "luarocks") - self.assertSuccess([ - "git", "clone", "https://github.com/keplerproject/luarocks", - "--depth=1", local_luarocks], from_prefix=False) + + if not os.path.exists(local_luarocks): + self.assertSuccess([ + "git", "clone", "https://github.com/keplerproject/luarocks", + "--depth=1", local_luarocks], from_prefix=False) + self.assertHererocksSuccess(["--lua", "https://github.com/lua/lua@5.1.3-rc3", "--luarocks", local_luarocks]) self.assertSuccess(["lua", "-v"], ["Lua 5.1.3"]) self.assertHererocksSuccess(["--show"], [