-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Skip modules without a package * Increment version
- Loading branch information
1 parent
aa1587b
commit 90df395
Showing
3 changed files
with
30 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "megamock" | ||
version = "0.1.0-beta.3" | ||
version = "0.1.0-beta.4" | ||
description = "Mega mocking capabilities - stop using dot-notated paths!" | ||
authors = ["James Hutchison <[email protected]>"] | ||
readme = "README.md" | ||
|
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,16 @@ | ||
from megamock.import_references import References | ||
from megamock.megamocks import MegaMock | ||
from megamock.megapatches import MegaPatch | ||
from megamock.megas import Mega | ||
|
||
|
||
class TestReferences: | ||
class TestAddReference: | ||
def test_when_package_is_missing_do_not_add(self) -> None: | ||
patch = MegaPatch.it(References._add_reference) | ||
|
||
calling_module = MegaMock() | ||
calling_module.__package__ = "" | ||
References.add_reference(MegaMock(), calling_module, "orig", "named_as") | ||
|
||
assert Mega(patch.mock).not_called() |