-
Notifications
You must be signed in to change notification settings - Fork 60
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
Showing
2 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
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
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,36 @@ | ||
import unittest | ||
|
||
import pytest | ||
|
||
|
||
class TestPyprojectExtra(unittest.TestCase): | ||
|
||
@pytest.mark.gcs | ||
def test_gcs_installed(self): | ||
try: | ||
import googleapiclient # noqa: F401 | ||
except ImportError: | ||
raise Exception('googleapiclient should be installed') | ||
|
||
@pytest.mark.no_gcs | ||
def test_no_gcs(self): | ||
try: | ||
import googleapiclient # noqa: F401 | ||
raise Exception('googleapiclient should not be installed') | ||
except ImportError: | ||
pass | ||
|
||
@pytest.mark.s3 | ||
def test_s3_installed(self): | ||
try: | ||
import boto3 # noqa: F401 | ||
except ImportError: | ||
raise Exception('boto3 should be installed') | ||
|
||
@pytest.mark.no_s3 | ||
def test_no_s3(self): | ||
try: | ||
import boto3 # noqa: F401 | ||
raise Exception('boto3 should not be installed') | ||
except ImportError: | ||
pass |