-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from 4dn-dcic/kmp_C4-102_C4-92_cgap_bucketing
CGAP bucketing fixes (C4-92, C4-102)
- Loading branch information
Showing
10 changed files
with
401 additions
and
75 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
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,20 @@ | ||
""" | ||
qa_utils: Tools for use in quality assurance testing. | ||
""" | ||
|
||
from .misc_utils import PRINT | ||
|
||
|
||
def mock_not_called(name): | ||
""" | ||
This can be used in mocking to mock a function that should not be called. | ||
Called with the name of a function, it returns a function that if called | ||
will raise an AssertionError complaining that such a name was called. | ||
""" | ||
def mocked_function(*args, **kwargs): | ||
# It's OK to print here because we're expected to be called in a testing context, and | ||
# we're just about to fail a test. The person invoking the tests may want this data. | ||
PRINT("args=", args) | ||
PRINT("kwargs=", kwargs) | ||
raise AssertionError("%s was called where not expected." % name) | ||
return mocked_function |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "dcicutils" | ||
version = "0.12.1" | ||
version = "0.13.0" | ||
description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources" | ||
authors = ["William Ronchetti <[email protected]>"] | ||
license = "MIT" | ||
|
Oops, something went wrong.