-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manage version strings manually (#420)
- Loading branch information
1 parent
c1edd1c
commit 862f3cb
Showing
6 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[project] | ||
name = Rx | ||
project = RxPY | ||
# Please make sure the version here remains the same as in rx/__init__.py | ||
version = 3.0.0b4 | ||
description = Reactive Extensions (Rx) for Python | ||
author = Dag Brattli | ||
author_email = dag@brattli.net | ||
copyright = Copyright 2013-2019, Dag Brattli, Microsoft Corp., and Contributors | ||
license = MIT License | ||
url = http://reactivex.io | ||
download_url = https://github.com/ReactiveX/RxPY |
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,27 @@ | ||
import unittest | ||
|
||
from configparser import ConfigParser | ||
from os.path import abspath, dirname, join | ||
from re import match | ||
|
||
|
||
class VersionTest(unittest.TestCase): | ||
|
||
def test_version(self): | ||
|
||
root = abspath(join(dirname(__file__), '..')) | ||
|
||
with open(join(root, 'project.cfg')) as project_file: | ||
config = ConfigParser() | ||
config.read_file(project_file) | ||
project_meta = dict(config.items('project')) | ||
|
||
version = None | ||
with open(join(root, 'rx', '__init__.py')) as init_py: | ||
for line in init_py: | ||
version = match('\\s*__version__\\s*=\\s*[\'"](.*)[\'"]', line) | ||
if version is not None: | ||
version = version.group(1) | ||
break | ||
|
||
assert project_meta['version'] == version |