Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
examples
python_project
Commits
66065fed
Commit
66065fed
authored
6 years ago
by
Tamas Gal
Browse files
Options
Downloads
Plain Diff
Merge branch '1-calculate_mean-fails-for-python-2' into 'master'
Resolve "calculate_mean fails for Python 2" Closes
#1
See merge request
!1
parents
ac910ebc
bebcf1af
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Resolve "calculate_mean fails for Python 2"
Pipeline
#1810
passed
6 years ago
Stage: test
Stage: coverage
Stage: doc
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.rst
+1
-0
1 addition, 0 deletions
CHANGELOG.rst
foo/bar.py
+2
-1
2 additions, 1 deletion
foo/bar.py
foo/tests/test_bar.py
+4
-1
4 additions, 1 deletion
foo/tests/test_bar.py
with
7 additions
and
2 deletions
CHANGELOG.rst
+
1
−
0
View file @
66065fed
...
...
@@ -2,6 +2,7 @@ Unreleased changes
------------------
* A bugfix
* Fixed a bug in calculate_mean which was present in python 2.7 envoronments
Version 0
...
...
This diff is collapsed.
Click to expand it.
foo/bar.py
+
2
−
1
View file @
66065fed
#!usr/bin/env python
# -*- coding: utf-8 -*-
# Filename: bar.py
from
__future__
import
division
"""
The bar module.
"""
__author__
=
"
Your Name
"
__author__
=
"
Jürgen
"
__credits__
=
[
"
The guy in your office
"
,
"
Tom
"
]
__license__
=
"
MIT
"
__maintainer__
=
"
Your Buddy
"
...
...
This diff is collapsed.
Click to expand it.
foo/tests/test_bar.py
+
4
−
1
View file @
66065fed
...
...
@@ -8,7 +8,7 @@ from foo.bar import whats_the_meaning_of_life, calculate_mean
__author__
=
"
Your Name
"
__credits__
=
[]
__license__
=
"
MIT
"
__maintainer__
=
"
Your Name
"
__maintainer__
=
"
Jürgen
"
__email__
=
"
yname@km3net.de
"
...
...
@@ -38,3 +38,6 @@ class TestCalculateMean(TestCase):
def
test_calculate_mean_returns_correct_value_for_negative_numbers
(
self
):
assert
-
3
==
calculate_mean
([
-
1
,
-
2
,
-
3
,
-
4
,
-
5
])
def
test_calculate_mean_of_some_other_numbers
(
self
):
self
.
assertAlmostEqual
(
2.5
,
calculate_mean
([
1
,
2
,
3
,
4
]))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment