Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TsumiNa committed Jan 25, 2018
1 parent a599614 commit 3bb7a83
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Contribution guidelines
* Check codes with Pylint
* Writing tests if possible

Contract
========

* With issues_
* With Gitter_
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ def get_requirements(filename: str):
# Project Url
URL = "https://github.com/{0}/{1}".format(GITHUB_USERNAME, repository_name)
# Use todays date as GitHub release tag
github_release_tag = str(date.today())
github_release_tag = 'v' + VERSION
# Source code download url
DOWNLOAD_URL = "https://github.com/{0}/{1}/tarball/{2}".format(
DOWNLOAD_URL = "https://github.com/{0}/{1}/archive/{2}.tar.gz".format(
GITHUB_USERNAME, repository_name, github_release_tag)

try:
Expand Down
8 changes: 6 additions & 2 deletions tests/test_datatools.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def setup():
rmtree(str(test['test_dir']))
if (Path.home() / '.xenonpy/cached/travis').exists():
rmtree(str(Path.home() / '.xenonpy/cached/travis'))
if (Path().expanduser() / 'test_user_data.pkl.z').exists():
remove(str(Path().expanduser() / 'test_user_data.pkl.z'))
print('test over')


Expand All @@ -53,7 +55,8 @@ def test_loader(setup):
def test_loader_url(setup):
load = Loader()
file = load(
'https://raw.githubusercontent.com/yoshida-lab/XenonPy/master/travis/fetch_test.txt')
'https://raw.githubusercontent.com/yoshida-lab/XenonPy/master/travis/fetch_test.txt'
)
with open(str(file)) as f:
assert f.readline() == 'Test xenonpy.utils.Loader._fetch_data'

Expand Down Expand Up @@ -86,7 +89,7 @@ def test_loader_return_saver(setup):

def test_saver1(setup):
saver = Saver(setup['user_dataset'])
ret = 'Dataset: {} with:'.format(setup['user_dataset'])
ret = '"{}" include:'.format(setup['user_dataset'])
assert str(saver) == ret, 'no files'


Expand Down Expand Up @@ -153,6 +156,7 @@ def test_dump2(setup):
dumped = jl.load(path)
assert dumped['key1'] == list('qwer')


def test_saver_delete1(setup):
saver = Saver(setup['user_dataset'])
saver.rm(0)
Expand Down
2 changes: 1 addition & 1 deletion xenonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# license that can be found in the LICENSE file.

__version__ = '0.1.0'
__release__ = 'b2'
__release__ = 'b5'
__short_description__ = "material descriptor library"
__license__ = "BSD (3-clause)"
__author__ = "TsumiNa"
Expand Down

0 comments on commit 3bb7a83

Please sign in to comment.