File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 46
46
# Middlewares
47
47
'WsgiMiddleware' ,
48
48
)
49
+
50
+ __version__ = '1.2.0'
Original file line number Diff line number Diff line change 1
1
from setuptools import setup
2
+ from azure .functions import __version__
2
3
3
4
4
5
setup (
5
6
name = 'azure-functions' ,
6
- version = '1.2.0' ,
7
+ version = __version__ ,
7
8
description = 'Azure Functions for Python' ,
8
9
author = 'Microsoft Corporation' ,
9
10
Original file line number Diff line number Diff line change 2
2
import subprocess
3
3
import sys
4
4
import unittest
5
+ import re
6
+ import azure .functions as func
5
7
6
8
7
9
ROOT_PATH = pathlib .Path (__file__ ).parent .parent
@@ -47,3 +49,11 @@ def test_flake8(self):
47
49
output = ex .output .decode ()
48
50
raise AssertionError (
49
51
f'flake8 validation failed:\n { output } ' ) from None
52
+
53
+ def test_library_version (self ):
54
+ # PEP 440 Parsing version strings with regular expressions
55
+ is_valid = re .match (
56
+ r'^([1-9][0-9]*!)?(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))'
57
+ r'*((a|b|rc)(0|[1-9][0-9]*))?(\.post(0|[1-9][0-9]*))'
58
+ r'?(\.dev(0|[1-9][0-9]*))?$' , func .__version__ ) is not None
59
+ self .assertTrue (is_valid , '__version__ field must be canonical' )
You can’t perform that action at this time.
0 commit comments