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

Errors in Python unittests #308

Open
kozo2 opened this issue Oct 28, 2018 · 3 comments
Open

Errors in Python unittests #308

kozo2 opened this issue Oct 28, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@kozo2
Copy link
Member

kozo2 commented Oct 28, 2018

env

  • Windows10
  • ecell 4.2.0
  • miniconda Python 3.7.1

Errors

(base) C:\Users\a\ecell4\python\tests>python -m unittest
EEE.......E.EE.
======================================================================
ERROR: test1 (core.test_context.ContextText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_context.py", line 13, in test1
    self.assertEqual(sp1.count(Species("A")), 1)
  File "lib\ecell4\Species.pxi", line 245, in ecell4.core.Species.count
RuntimeError: deprecated

======================================================================
ERROR: test2 (core.test_context.ContextText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_context.py", line 18, in test2
    self.assertEqual(sp1.count(Species("A.B")), 1)
  File "lib\ecell4\Species.pxi", line 245, in ecell4.core.Species.count
RuntimeError: deprecated

======================================================================
ERROR: test3 (core.test_context.ContextText)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_context.py", line 23, in test3
    self.assertEqual(sp1.count(Species("A(p=u^1).B(b^1)")), 1)
  File "lib\ecell4\Species.pxi", line 245, in ecell4.core.Species.count
RuntimeError: deprecated

======================================================================
ERROR: test2 (core.test_species.SpeciesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_species.py", line 21, in test2
    self.assertEqual(sp.num_units(), 3)
AttributeError: 'ecell4.core.Species' object has no attribute 'num_units'

======================================================================
ERROR: test4 (core.test_species.SpeciesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_species.py", line 51, in test4
    sp.deserialize('A.B.C')
AttributeError: 'ecell4.core.Species' object has no attribute 'deserialize'

======================================================================
ERROR: test5 (core.test_species.SpeciesTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\a\ecell4\python\tests\core\test_species.py", line 66, in test5
    self.assertEqual(sp.num_units(), 2)
AttributeError: 'ecell4.core.Species' object has no attribute 'num_units'

----------------------------------------------------------------------
Ran 15 tests in 0.003s

FAILED (errors=6)

@kozo2 kozo2 added this to the v4.2.0 milestone Oct 28, 2018
@kozo2 kozo2 self-assigned this Oct 28, 2018
@kaizu kaizu self-assigned this Oct 29, 2018
kaizu added a commit that referenced this issue Oct 29, 2018
@kaizu
Copy link
Member

kaizu commented Oct 29, 2018

Species's count, num_units, and deserialize are deprecated. Species::count could be replaced with count_species_matches. To count the number of unit species, check the size of a list given by Species::units. Function Species::deserialize has no alternative. Just use Species constructor instead.

@kaizu
Copy link
Member

kaizu commented Nov 5, 2018

Close this. If not fixed, please reopen.

@kaizu kaizu closed this as completed Nov 5, 2018
@kozo2
Copy link
Member Author

kozo2 commented Nov 19, 2018

It failed again. Refer to https://api.travis-ci.org/v3/job/455078340/log.txt

@kozo2 kozo2 reopened this Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants