Skip to content

Commit

Permalink
Fix: testt
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiandongx committed Apr 13, 2019
1 parent 7d83e25 commit a4a8e61
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 27 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ notifications:
python:
- "3.7-dev"
- "3.6"
- "3.5"
before_install:
- pip install -r test/requirements.txt
script:
Expand Down
7 changes: 1 addition & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
environment:

matrix:
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5"
- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6"
- PYTHON: "C:\\Python37-x64"
PYTHON_VERSION: "3.7"

install:
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- cd test
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- "%PYTHON%\\python.exe -m pip install mock"
build: off

test_script:
"%PYTHON%/Scripts/nosetests --with-coverage --cover-package pyecharts --cover-package test && cd .. && %PYTHON%/Scripts/flake8 --exclude docs --builtins=unicode,xrange,long,basestring"
- make.bat
12 changes: 4 additions & 8 deletions example/boxplot_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@
@C.funcs
def boxpolt_base() -> Boxplot:
v1 = [
[850, 740, 900, 1070, 930, 850, 950, 980, 980, 880]
+ [1000, 980, 930, 650, 760, 810, 1000, 1000, 960, 960],
[960, 940, 960, 940, 880, 800, 850, 880, 900]
+ [840, 830, 790, 810, 880, 880, 830, 800, 790, 760, 800],
[850, 740, 900, 1070, 930, 850, 950, 980, 980, 880, 1000, 980],
[960, 940, 960, 940, 880, 800, 850, 880, 900, 840, 830, 790],
]
v2 = [
[890, 810, 810, 820, 800, 770, 760, 740, 750, 760]
+ [910, 920, 890, 860, 880, 720, 840, 850, 850, 780],
[890, 840, 780, 810, 760, 810, 790, 810, 820, 850, 870]
+ [870, 810, 740, 810, 940, 950, 800, 810, 870],
[890, 810, 810, 820, 800, 770, 760, 740, 750, 760, 910, 920],
[890, 840, 780, 810, 760, 810, 790, 810, 820, 850, 870, 870],
]
c = Boxplot()
c.add_xaxis(["expr1", "expr2"]).add_yaxis("A", c.prepare_data(v1)).add_yaxis(
Expand Down
6 changes: 4 additions & 2 deletions example/commons.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ class _Faker:
dogs = ["哈士奇", "萨摩耶", "泰迪", "金毛", "牧羊犬", "吉娃娃", "柯基"]
week = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
week_en = "Saturday Friday Thursday Wednesday Tuesday Monday Sunday".split()
clock = "12a 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a 11a 12p " \
"1p 2p 3p 4p 5p 6p 7p 8p 9p 10p 11p".split()
clock = (
"12a 1a 2a 3a 4a 5a 6a 7a 8a 9a 10a 11a 12p "
"1p 2p 3p 4p 5p 6p 7p 8p 9p 10p 11p".split()
)
visual_color = [
"#313695",
"#4575b4",
Expand Down
2 changes: 1 addition & 1 deletion example/line3d_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def line3d_base() -> Line3D:


@C.funcs
def line3d_base() -> Line3D:
def line3d_auto_rotate() -> Line3D:
data = []
for t in range(0, 25000):
_t = t / 1000
Expand Down
2 changes: 1 addition & 1 deletion example/map_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def map_visualmap() -> Map:


@C.funcs
def map_visualmap() -> Map:
def map_visualmap_piecewise() -> Map:
c = (
Map()
.add("商家A", [list(z) for z in zip(Faker.provinces, Faker.values())], "china")
Expand Down
2 changes: 1 addition & 1 deletion example/polar_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def polar_angleaxis() -> Polar:


@C.funcs
def polar_flower() -> Polar:
def polar_love() -> Polar:
data = []
for i in range(101):
theta = i / 100 * 360
Expand Down
2 changes: 1 addition & 1 deletion example/scatter_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def scatter_visualmap_color() -> Scatter:


@C.funcs
def scatter_visualmap_color() -> Scatter:
def scatter_visualmap_size() -> Scatter:
c = (
Scatter()
.add_xaxis(Faker.choose())
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd test
nosetests --with-coverage --cover-package pyecharts --cover-package test && cd .. && flake8 --max-complexity 14 --exclude docs --max-line-length 89 --ignore=F401
nosetests --with-coverage --cover-package pyecharts --cover-package test && cd .. && flake8 --exclude build --max-line-length 89 --ignore=F401
8 changes: 4 additions & 4 deletions pyecharts/charts/basic_charts/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def add(
_nodes.append(n)

_links = []
for l in links:
if isinstance(l, opts.GraphLink):
l = l.opts
_links.append(l)
for link in links:
if isinstance(link, opts.GraphLink):
link = link.opts
_links.append(link)

if categories:
for c in categories:
Expand Down
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd test
nosetests --with-coverage --cover-package pyecharts --cover-package test && cd .. && flake8 --max-complexity 14 --exclude docs
nosetests --with-coverage --cover-package pyecharts --cover-package test && cd .. && flake8 --exclude build --max-line-length 89 --ignore=F401

0 comments on commit a4a8e61

Please sign in to comment.