Sage-Bionetworks / annotator

A Synapse annotations automation tool.
MIT License
1 stars 2 forks source link

tests are not running #52

Open kdaily opened 6 years ago

kdaily commented 6 years ago
(annotator) [kdaily@tigger annotator]$ nosetests

----------------------------------------------------------------------
Ran 0 tests in 0.535s

OK
(annotator) [kdaily@tigger annotator]$ pytest 
============================================================================ test session starts =============================================================================
platform linux2 -- Python 2.7.14, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /home/kdaily/src/annotator, inifile:
collected 0 items                                                                                                                                                            

======================================================================== no tests ran in 6.02 seconds ========================================================================
teslajoy commented 6 years ago

runs via nosetests -vs tests/integration/test_json2synapse.py:check_keys But I'll have to change it to pytest.

kdaily commented 6 years ago

OK! need to figure out how to register it in the appropriate way so that when new tests are added, all tests can be run via just pytest. Thanks!

philerooski commented 6 years ago

Tests fail for me unless I run them in the directory they live in. I think the root of the problem is the relative import of tests/sampleFile.csv and tests/sampleMeta.csv. Should we just include the contents of these files in conftest.py? I don't foresee them getting very large.

teslajoy commented 6 years ago

We need to make a conversion to not push code to master if the tests fail on py27 and py3

screen shot 2018-02-04 at 11 38 35 am
philerooski commented 6 years ago

I strongly agree, of course. Luckily for now it's just a file dependency issue and not the actual methods breaking. I'll work on getting that fixed today.

@teslajoy Is the test project at a point where it can be "set in stone" for consistent testing or should we just pull SAMPLE_FILE and SAMPLE_META from Github for now?

teslajoy commented 6 years ago

Pulling from github's master for now.

teslajoy commented 6 years ago

screen shot 2018-02-16 at 11 19 33 am

Much better, just have to reopen this issue since not all tests are passing yet.

philerooski commented 6 years ago

It looks like the tests are all passing in python 3 but the above tests fail for python2.7

teslajoy commented 6 years ago

I tested two hypothesis: scope issues with pytest conftest: I can get the syn, entities, sampleFiles, etc. so this is not the issue. incompatibility of pandas and pytest version: not true either. I see the df

Next up: uploading a file to synapse fails and returns HTTP 200 instead of ERROR we get FAILED via the pandas.testing. I think the files can't be stored and df doesn't exists.

not sure why py3 upload to synapse works.