Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making and error #14

Merged
merged 16 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ jobs:
- name: Install Project
run: pip install '.[test]'
- name: Run tests
run: pytest -vv tests integration
run: pytest --junitxml=test-result.xml
- name: Publish Test Results
uses: EnricoMi/[email protected]
if: always()
with:
files: test-result.xml
check_name: Test Result (Python ${{matrix.python-version}})
permissions:
contents: read
issues: read
checks: write
pull-requests: write
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.vscode


# ignore log
*.log.*
4 changes: 2 additions & 2 deletions assets/people.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Jim Halpert, Sales, Salesman, jim@dundlermifflin.com
Dwight Schrute, Sales, Manager, schrute@dundlermifflin.com
Jim Halpert, Sales, Salesman, jim@dundermifflin.com
Dwight Schrute, Sales, Manager, schrute@dundermifflin.com
2 changes: 1 addition & 1 deletion dundie/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def main():
parser = argparse.ArgumentParser(
description="Dundler Mifflin Rewards CLI",
description="Dunder Mifflin Rewards CLI",
epilog="Enjoy and use with cautious.",
)
parser.add_argument(
Expand Down
5 changes: 3 additions & 2 deletions tests/assets/people.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Jim Halpert, Sales, Salesman, [email protected]
Dwight Schrute, Sales, Manager, [email protected]
Jim Halpert, Sales, Salesman, [email protected]
Dwight Schrute, Sales, Manager, [email protected]
Gabe Lewis, Directory, Manager, [email protected]
12 changes: 9 additions & 3 deletions tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@

@pytest.mark.unit
@pytest.mark.high
def test_load():
"""Test load function."""
assert len(load(PEOPLE_FILE)) == 2
def test_load_positive_has_2_people(request):
"""Test load function has 2 people."""
assert len(load(PEOPLE_FILE)) == 3


@pytest.mark.unit
@pytest.mark.high
def test_load_positive_first_name_starts_with_j(request):
"""Test load function starts with letter J."""
assert load(PEOPLE_FILE)[0][0] == 'J'
Loading