File tree 4 files changed +31
-2
lines changed
4 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish
2
2
on :
3
3
release :
4
- types : [created ]
4
+ types : [published ]
5
5
jobs :
6
6
deploy :
7
7
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change
1
+ import os
1
2
from setuptools import setup
2
3
4
+
5
+ this_directory = os .path .abspath (os .path .dirname (__file__ ))
6
+ with open (os .path .join (this_directory , 'README.md' ), "r" ) as f :
7
+ long_description = f .read ()
8
+
9
+
3
10
setup (
4
11
name = "pytest_func_cov" ,
5
12
packages = ["pytest_func_cov" ],
6
- version = "0.1.2 " ,
13
+ version = "0.1.3 " ,
7
14
license = "MIT" ,
8
15
description = "Pytest plugin for measuring function coverage" ,
16
+ long_description = long_description ,
17
+ long_description_content_type = 'text/markdown' ,
9
18
author = "Radu Ghitescu" ,
10
19
author_email = "radu.ghitescu@gmail.com" ,
11
20
url = "https://github.com/radug0314/pytest_func_cov" ,
Original file line number Diff line number Diff line change 4
4
5
5
from .test_package import classes , functions
6
6
7
+ import os
8
+
7
9
8
10
@pytest .mark .parametrize (
9
11
"func" ,
@@ -20,3 +22,21 @@ def test_get_full_function_name_correct_for_simple_function(func):
20
22
expected_name = f"{ func .__module__ } .{ func .__qualname__ } "
21
23
22
24
assert tracking .get_full_function_name (func ) == expected_name
25
+
26
+ @pytest .fixture
27
+ def package_path ():
28
+ return os .path .dirname (os .path .abspath (__file__ ))
29
+
30
+ @pytest .fixture
31
+ def non_package_path ():
32
+ return os .path .dirname (os .path .abspath (__file__ )) + "/test_non_package/"
33
+
34
+ def test_is_package_with_package (package_path ):
35
+ expected_result = tracking .is_package (package_path )
36
+
37
+ assert expected_result
38
+
39
+ def test_is_package_with_non_package (non_package_path ):
40
+ expected_result = tracking .is_package (non_package_path )
41
+
42
+ assert not expected_result
You can’t perform that action at this time.
0 commit comments