Skip to content

Commit

Permalink
add integration test marker
Browse files Browse the repository at this point in the history
  • Loading branch information
kalefranz committed Feb 4, 2017
1 parent f71c08a commit 157c5e3
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 19 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ doctest_optionflags =
IGNORE_EXCEPTION_DETAIL
ALLOW_UNICODE
markers =
integration: integration tests that usually require an internet connect
slow: slow running tests
installed: tests that assume conda is pre-installed on PATH

Expand Down
1 change: 0 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ def test_list(self):
assert stderr == ''
assert rc > 0

@pytest.mark.timeout(300)
def test_search_0(self):
with captured():
res = capture_json_with_argv('conda search --json')
Expand Down
14 changes: 1 addition & 13 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def get_conda_list_tuple(prefix, package_name):
return package_line.split()


@pytest.mark.integration
class IntegrationTests(TestCase):

def setUp(self):
Expand All @@ -191,7 +192,6 @@ def test_install_python2(self):
assert exists(join(prefix, PYTHON_BINARY))
assert_package_is_installed(prefix, 'python-2')

@pytest.mark.timeout(900)
def test_create_install_update_remove(self):
with make_temp_env("python=3.5") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
Expand Down Expand Up @@ -248,7 +248,6 @@ def test_noarch_generic_package(self):
with make_temp_env("-c conda-test font-ttf-inconsolata") as prefix:
assert isfile(join(prefix, 'fonts', 'Inconsolata-Regular.ttf'))

@pytest.mark.timeout(300)
def test_create_empty_env(self):
with make_temp_env() as prefix:
assert exists(join(prefix, 'conda-meta/history'))
Expand All @@ -269,7 +268,6 @@ def test_create_empty_env(self):
self.assertEquals(stderr, '')
self.assertIsInstance(stdout, str)

@pytest.mark.timeout(300)
def test_list_with_pip_egg(self):
with make_temp_env("python=3.5 pip") as prefix:
check_call(PYTHON_BINARY + " -m pip install --egg --no-binary flask flask==0.10.1",
Expand All @@ -279,7 +277,6 @@ def test_list_with_pip_egg(self):
assert any(line.endswith("<pip>") for line in stdout_lines
if line.lower().startswith("flask"))

@pytest.mark.timeout(300)
def test_list_with_pip_wheel(self):
with make_temp_env("python=3.5 pip") as prefix:
check_call(PYTHON_BINARY + " -m pip install flask==0.10.1",
Expand All @@ -293,7 +290,6 @@ def test_list_with_pip_wheel(self):
run_command(Commands.INSTALL, prefix, "python=3.4")
assert_package_is_installed(prefix, 'python-3.4.')

@pytest.mark.timeout(300)
def test_install_tarball_from_local_channel(self):
with make_temp_env("flask=0.10.1") as prefix:
assert_package_is_installed(prefix, 'flask-0.10.1')
Expand Down Expand Up @@ -342,7 +338,6 @@ def test_install_tarball_from_local_channel(self):
run_command(Commands.INSTALL, prefix, tar_bld_path)
assert_package_is_installed(prefix, 'flask-')

@pytest.mark.timeout(300)
def test_tarball_install_and_bad_metadata(self):
with make_temp_env("python flask=0.10.1 --json") as prefix:
assert_package_is_installed(prefix, 'flask-0.10.1')
Expand Down Expand Up @@ -391,7 +386,6 @@ def test_tarball_install_and_bad_metadata(self):
assert not package_is_installed(prefix, 'flask', exact=True)
assert_package_is_installed(prefix, 'flask-0.')

@pytest.mark.timeout(300)
def test_remove_all(self):
with make_temp_env("python=2") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
Expand All @@ -401,7 +395,6 @@ def test_remove_all(self):
assert not exists(prefix)

@pytest.mark.skipif(on_win, reason="nomkl not present on windows")
@pytest.mark.timeout(300)
def test_remove_features(self):
with make_temp_env("numpy nomkl") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
Expand Down Expand Up @@ -441,13 +434,11 @@ def test_dash_c_usage_replacing_python(self):
assert_package_is_installed(clone_prefix, 'python-3.5')
assert_package_is_installed(clone_prefix, 'decorator')

@pytest.mark.timeout(600)
def test_python2_pandas(self):
with make_temp_env("python=2 pandas") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
assert_package_is_installed(prefix, 'numpy')

@pytest.mark.timeout(300)
def test_install_prune(self):
with make_temp_env("python=2 decorator") as prefix:
assert_package_is_installed(prefix, 'decorator')
Expand All @@ -466,7 +457,6 @@ def test_install_prune(self):
assert not package_is_installed(prefix, 'decorator')

@pytest.mark.skipif(on_win, reason="mkl package not available on Windows")
@pytest.mark.timeout(300)
def test_install_features(self):
with make_temp_env("python=2 numpy") as prefix:
numpy_details = get_conda_list_tuple(prefix, "numpy")
Expand All @@ -476,7 +466,6 @@ def test_install_features(self):
numpy_details = get_conda_list_tuple(prefix, "numpy")
assert len(numpy_details) == 4 and 'nomkl' in numpy_details[3]

@pytest.mark.timeout(300)
def test_clone_offline(self):
with make_temp_env("python flask=0.10.1") as prefix:
assert_package_is_installed(prefix, 'flask-0.10.1')
Expand All @@ -488,7 +477,6 @@ def test_clone_offline(self):
assert_package_is_installed(clone_prefix, 'python')

@pytest.mark.skipif(on_win, reason="r packages aren't prime-time on windows just yet")
@pytest.mark.timeout(600)
def test_clone_offline_multichannel_with_untracked(self):
with make_temp_env("python=3.5") as prefix:

Expand Down
2 changes: 1 addition & 1 deletion tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
make_temp_prefix, run_command)


@pytest.mark.integration
class ExportIntegrationTests(TestCase):

@pytest.mark.timeout(900)
def test_basic(self):
with make_temp_env("python=3.5") as prefix:
assert exists(join(prefix, PYTHON_BINARY))
Expand Down
2 changes: 0 additions & 2 deletions tests/test_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

class TestConnectionWithShortTimeouts(TestCase):

@pytest.mark.timeout(6)
def test_download_connectionerror(self):
with env_var('CONDA_REMOTE_CONNECT_TIMEOUT_SECS', 1, reset_context):
with env_var('CONDA_REMOTE_READ_TIMEOUT_SECS', 1, reset_context):
Expand All @@ -28,7 +27,6 @@ def test_download_connectionerror(self):
download(url, mktemp())
assert msg in str(execinfo)

@pytest.mark.timeout(6)
def test_fetchrepodate_connectionerror(self):
with env_var('CONDA_REMOTE_CONNECT_TIMEOUT_SECS', 1, reset_context):
with env_var('CONDA_REMOTE_READ_TIMEOUT_SECS', 1, reset_context):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
run_command, Commands, get_conda_list_tuple)


class PriorityTest(TestCase):
@pytest.mark.integration
class PriorityIntegrationTests(TestCase):

def test_channel_order_channel_priority_true(self):
with make_temp_env("python=3.5 pycosat==0.6.1") as prefix:
Expand All @@ -33,7 +34,6 @@ def test_channel_order_channel_priority_true(self):
pycosat_tuple = get_conda_list_tuple(prefix, "pycosat")
assert pycosat_tuple[3] == 'conda-forge'

@pytest.mark.timeout(300)
def test_channel_priority_update(self):
"""
This case will fail now
Expand Down

0 comments on commit 157c5e3

Please sign in to comment.