-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5fa5c3
commit 39cc7bd
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
conans/test/integration/conanfile/invalid_system_requirements_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import unittest | ||
from conans.client.command import ERROR_INVALID_SYSTEM_REQUIREMENTS | ||
from conans.test.utils.tools import TestClient | ||
|
||
|
||
class InvalidSystemRequirementsTest(unittest.TestCase): | ||
def test_create_method(self): | ||
self.client = TestClient() | ||
self.client.save({"conanfile.py": """ | ||
from conans import ConanFile | ||
from conans.errors import ConanInvalidSystemRequirements | ||
class MyPkg(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
def build_requirements(self): | ||
raise ConanInvalidSystemRequirements("Some package missed") | ||
"""}) | ||
|
||
error = self.client.run("create . name/ver@jgsogo/test", assert_error=True) | ||
self.assertEqual(error, ERROR_INVALID_SYSTEM_REQUIREMENTS) | ||
self.assertIn("Invalid system requirements: Some package missed", self.client.out) | ||
|