File tree 2 files changed +34
-0
lines changed
2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 5
5
source :
6
6
url : https://files.pythonhosted.org/packages/c2/4b/137dea450d6e1e3d474e1d873cd1d4f7d3beed7e0dc973b06e8e10d32488/cycler-0.10.0.tar.gz
7
7
md5 : 4cb42917ac5007d1cdff6cccfe2d016b
8
+
9
+ test :
10
+ imports :
11
+ - cycler
Original file line number Diff line number Diff line change
1
+ import pytest
2
+ import os
3
+ from pathlib import Path
4
+ import sys
5
+
6
+ BASE_DIR = Path (__file__ ).parent .parent
7
+ PKG_DIR = BASE_DIR / 'packages'
8
+
9
+ # TODO: remove once we have a proper Python package for common functions
10
+ sys .path .append (str (BASE_DIR / 'tools' ))
11
+ import common # noqa
12
+
13
+
14
+ def registered_packages ():
15
+ packages = [name for name in os .listdir (PKG_DIR )
16
+ if (PKG_DIR / name ).is_dir ()]
17
+ return packages
18
+
19
+
20
+ @pytest .mark .parametrize ('name' , registered_packages ())
21
+ def test_meta (selenium , name ):
22
+ # check that we can parse the meta.yaml
23
+ meta = common .parse_package (PKG_DIR / name / 'meta.yaml' )
24
+
25
+ if 'test' in meta :
26
+ if 'imports' in meta ['test' ]:
27
+ # check imports
28
+ for import_name in meta ['test' ]['imports' ]:
29
+ selenium .load_package (import_name )
30
+ selenium .run ('import %s' % import_name )
You can’t perform that action at this time.
0 commit comments