Skip to content

Commit aa6ed2a

Browse files
committed
solved the output conflicts
1 parent 00cb987 commit aa6ed2a

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

.learn/exercises/04-Series/test.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pytest, io, os, sys, re
22

3+
34
@pytest.mark.it('You must import pandas')
45
def test_import_pandas():
56
path = os.path.dirname(os.path.abspath('app.py'))+'/app.py'
@@ -8,15 +9,11 @@ def test_import_pandas():
89
regex = re.compile(r"import\s*pandas")
910
assert bool(regex.search(content)) == True
1011

11-
@pytest.mark.it('The variable ages must exist')
12-
def test_vatiable_existence():
13-
from app import ages
14-
1512
@pytest.mark.it("Use the print function")
1613
def test_output():
1714
f = open(os.path.dirname(os.path.abspath('app.py')) + '/app.py')
1815
content = f.read()
19-
assert content.find("print(") > 0
16+
assert content.find("print") > 0
2017

2118
@pytest.mark.it('The output should be the expected')
2219
def test_expected_output(capsys):
@@ -33,4 +30,8 @@ def test_expected_output(capsys):
3330
8 54
3431
9 34
3532
dtype: int64
36-
"""
33+
"""
34+
35+
@pytest.mark.it('The variable ages must exist')
36+
def test_vatiable_existence():
37+
from app import ages

.learn/exercises/04.2-Series_Apply/test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ def test_output():
1414
content = f.read()
1515
assert content.find("print(") > 0
1616

17-
@pytest.mark.it('The variable my_series should exist')
18-
def test_variable_existence():
19-
from app import my_series
2017

2118
@pytest.mark.it('The output should be the expected')
2219
def test_expected_output(capsys):
@@ -27,4 +24,9 @@ def test_expected_output(capsys):
2724
2 3.0
2825
3 4.0
2926
4 5.0
30-
dtype: float64"""
27+
dtype: float64
28+
"""
29+
30+
@pytest.mark.it('The variable my_series should exist')
31+
def test_variable_existence():
32+
from app import my_series

conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ def pytest_generate_tests(metafunc):
2424
except AttributeError:
2525
metafunc.parametrize("app",[cached_app])
2626
if 'configuration' in metafunc.fixturenames:
27-
metafunc.parametrize("configuration", [json.loads('{"port":3000,"address":"https://kiddopro-pythonpandastut-zzjbcc6h0h1.ws-us34.gitpod.io","editor":{"mode":"preview","agent":"gitpod","version":"1.0.72"},"dirPath":"./.learn","configPath":"learn.json","outputPath":".learn/dist","publicPath":"/preview","publicUrl":"https://3000-kiddopro-pythonpandastut-zzjbcc6h0h1.ws-us34.gitpod.io","language":"auto","grading":"incremental","exercisesPath":".learn/exercises","webpackTemplate":null,"disableGrading":false,"disabledActions":["build"],"actions":[],"entries":{"html":"index.html","vanillajs":"index.js","react":"app.jsx","node":"app.js","python3":"app.py","java":"app.java"},"preview":"https://github.com/4GeeksAcademy/python-pandas-tutorial/blob/main/.learn/assets/pandas-preview.jpeg?raw=true","difficulty":"beginner","duration":3,"description":"Learn the basics and become comfortable using pandas for manipulating machine learning datasets .","title":"Pandas for Machine Learning","slug":"pandas-for-machine-learning","session":8607061631283586000,"translations":[]}')])
27+
metafunc.parametrize("configuration", [json.loads('{"port":3000,"address":"https://kiddopro-pythonpandastut-zzjbcc6h0h1.ws-us34.gitpod.io","editor":{"mode":"preview","agent":"gitpod","version":"1.0.72"},"dirPath":"./.learn","configPath":"learn.json","outputPath":".learn/dist","publicPath":"/preview","publicUrl":"https://3000-kiddopro-pythonpandastut-zzjbcc6h0h1.ws-us34.gitpod.io","language":"auto","grading":"incremental","exercisesPath":".learn/exercises","webpackTemplate":null,"disableGrading":false,"disabledActions":["build"],"actions":[],"entries":{"html":"index.html","vanillajs":"index.js","react":"app.jsx","node":"app.js","python3":"app.py","java":"app.java"},"preview":"https://github.com/4GeeksAcademy/python-pandas-tutorial/blob/main/.learn/assets/pandas-preview.jpeg?raw=true","difficulty":"beginner","duration":3,"description":"Learn the basics and become comfortable using pandas for manipulating machine learning datasets .","title":"Pandas for Machine Learning","slug":"pandas-for-machine-learning","session":8168377007383989000,"translations":[]}')])

0 commit comments

Comments
 (0)