This repository has been archived by the owner on Dec 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for minimal pkg not throw (#3199)
* fix import check not throw * python2 import error __str__ uses args instead of message * tuple forwarding
- Loading branch information
Guihao Liang
authored
May 19, 2020
1 parent
aa78196
commit a101a96
Showing
4 changed files
with
53 additions
and
12 deletions.
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,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright © 2020 Apple Inc. All rights reserved. | ||
# | ||
# Use of this source code is governed by a BSD-3-clause license that can | ||
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause | ||
# | ||
from __future__ import print_function as _ # noqa | ||
from __future__ import division as _ # noqa | ||
from __future__ import absolute_import as _ # noqa | ||
import turicreate as _tc | ||
import pytest | ||
|
||
pytestmark = [pytest.mark.minimal] | ||
|
||
|
||
@pytest.mark.skipif(not _tc._deps.is_minimal_pkg(), reason="skip when testing full pkg") | ||
class TestMinimalPackage(object): | ||
""" test minimal package for toolkits. | ||
well, other toolkits are too hard to setup | ||
""" | ||
|
||
def test_audio_classifier(self): | ||
with pytest.raises( | ||
ImportError, match=r".*pip install --force-reinstall turicreate==.*" | ||
): | ||
_tc.load_audio("./dummy/audio") |
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