Skip to content

Commit

Permalink
fix matplotlib travis error
Browse files Browse the repository at this point in the history
  • Loading branch information
TsumiNa committed Jan 19, 2018
1 parent 2c64bcc commit 2a6f4a3
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ before_script:
install: source travis/install.sh

script:
- python -m unittest discover
- make unittest

after_script: conda remove --name xenonpy --all
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export SHELL := /bin/bash

doctest:
pytest --doctest-modules xenonpy

unittest:
pytest tests

lint:
pylint xenonpy
14 changes: 6 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
matplotlib~=2.1.1
numpy~=1.14.0
pandas~=0.22.0
matplotlib
numpy
pandas
pymatgen
PyMonad
PyYAML
scikit-learn~=0.19.1
scipy~=1.0
scikit-learn
scipy
seaborn
Sphinx
sphinx-rtd-theme
urllib3==1.22
urllib3
4 changes: 4 additions & 0 deletions tests/models/test_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.


def test_layer():
print('test')
assert 1
46 changes: 23 additions & 23 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

import unittest
import pytest as pt

@pt.fixture(scope='module')
def setup():
print('ignore NumPy RuntimeWarning\n')
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ndarray size changed")
yield 'running test'
print('test over')

class TestDatasets(unittest.TestCase):
'''Test dataset module'''

@classmethod
def setUpClass(cls):
print('ignore NumPy RuntimeWarning\n')
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ndarray size changed")
# def test_load(self):
# '''Test load function'''
# e = load('elements')
# self.assertEqual(118, e.shape[0])
# self.assertEqual(74, e.shape[1])
# e = load('mp_inorganic')
# self.assertEqual(69640, e.shape[0])
# self.assertEqual(15, e.shape[1])
# e = load('electron_density')
# self.assertEqual(103, e.shape[0])
# self.assertEqual(401, e.shape[1])

# def test_load(self):
# '''Test load function'''
# e = load('elements')
# self.assertEqual(118, e.shape[0])
# self.assertEqual(74, e.shape[1])
# e = load('mp_inorganic')
# self.assertEqual(69640, e.shape[0])
# self.assertEqual(15, e.shape[1])
# e = load('electron_density')
# self.assertEqual(103, e.shape[0])
# self.assertEqual(401, e.shape[1])

def test_pass(self):
self.assertEqual(True, True, 'should pass')
def test_pass(setup):
print(setup)
assert 1, 'should pass'
2 changes: 2 additions & 0 deletions travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ else
fi

source activate xenonpy
conda install pytest pytest-cov pylint


python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
Expand Down
185 changes: 0 additions & 185 deletions xenonpy/_tables.py

This file was deleted.

0 comments on commit 2a6f4a3

Please sign in to comment.