-
Notifications
You must be signed in to change notification settings - Fork 122
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
3cef9a1
commit 1b2e7dc
Showing
11 changed files
with
112 additions
and
166 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 was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
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,22 +1,16 @@ | ||
# Copyright (c) Amber Brown, 2015 | ||
# See LICENSE for details. | ||
|
||
from incremental import Version | ||
from twisted.trial.unittest import TestCase | ||
|
||
from towncrier._version import _hatchling_version | ||
import towncrier | ||
|
||
|
||
class TestPackaging(TestCase): | ||
def test_version_warning(self): | ||
def no_version_attr(self): | ||
""" | ||
Import __version__ from towncrier returns an Incremental version object | ||
and raises a warning. | ||
towncrier.__version__ was deprecated, now no longer exists. | ||
""" | ||
with self.assertWarnsRegex( | ||
DeprecationWarning, "Accessing towncrier.__version__ is deprecated.*" | ||
): | ||
from towncrier import __version__ | ||
|
||
self.assertIsInstance(__version__, Version) | ||
self.assertEqual(_hatchling_version, __version__.short()) | ||
with self.assertRaises(AttributeError): | ||
towncrier.__version__ |
Oops, something went wrong.