From e0c456604d10ed13fd4b715547650da5ae5714f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Sun, 1 Mar 2020 19:48:11 +0100 Subject: [PATCH] verify if __CIBW_VIRTUALENV_PATH__ is set --- test/02_test/test/spam_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/02_test/test/spam_test.py b/test/02_test/test/spam_test.py index 58ce05d0..0271b672 100644 --- a/test/02_test/test/spam_test.py +++ b/test/02_test/test/spam_test.py @@ -18,9 +18,11 @@ class TestSpam(TestCase): def test_virtualenv(self): virtualenv_path = normalize_path(os.environ.get("__CIBW_VIRTUALENV_PATH__")) + if not virtualenv_path: + self.fail("No virtualenv path defined in environment variable __CIBW_VIRTUALENV_PATH__") + print("=[executable]", sys.executable) print("=[spam location]", spam.__file__) print("=[virtualenv path]", virtualenv_path) self.assertTrue(virtualenv_path in normalize_path(sys.executable)) self.assertTrue(virtualenv_path in normalize_path(spam.__file__)) -