Here are the examples of the python api pytest.mark.skip taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
93 Examples
6
Example 1
Project: Flexget Source File: test_subtitle_list.py
@pytest.mark.skip
@pytest.mark.online
@pytest.mark.skipif(sys.version_info < (2, 7), reason='requires python2.7')
@pytest.mark.skipif(not subliminal, reason='requires subliminal')
def test_subtitle_list_subliminal_semi_fail(self, execute_task):
task = execute_task('subtitle_add_local_file')
assert len(task.entries) == 1, 'Task should have accepted walking dead local file'
task = execute_task('subtitle_fail')
# cleanup
try:
os.remove('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.en.srt')
except OSError:
pass
assert len(task.failed) == 1, 'Only one language should have been downloaded which results in failure'
3
Example 2
Project: Flexget Source File: test_feed_control.py
@pytest.mark.skip(reason="1.2 we need to test this with execute command")
def test_manual_with_onlytask(self, execute_task):
# TODO: 1.2 we need to test this with execute command
# Pretend we have been run with --task test
# This task should run normally, as we specified it as onlytask
task = execute_task('test', options=dict(tasks=['test']))
assert task.find_entry(title='download'), 'task failed to download with --task'
# This task should be disabled, as it wasn't specified with onlytask
task = execute_task('test2', options=dict(tasks=['test']), abort_ok=True)
assert task.aborted
assert not task.find_entry(title='nodownload'), 'task should not have been executed'
3
Example 3
Project: supriya Source File: test_supriya___init__.py
@pytest.mark.skip()
@pytest.mark.parametrize('obj', functions)
def test_supriya___init___03(obj):
r'''Make sure function keyword argument values are immutable.
'''
if isinstance(obj, functools.partial):
obj = obj.function
argument_specification = inspect.getargspec(obj)
keyword_argument_names = argument_specification.args[1:]
keyword_argument_values = argument_specification.defaults
if keyword_argument_values is None:
return
for name, value in zip(
keyword_argument_names, keyword_argument_values):
assert isinstance(value, valid_types), (name, value)
if isinstance(value, tuple):
assert all(isinstance(x, valid_types) for x in value)
3
Example 4
Project: rasterio Source File: test_colorinterp.py
@pytest.mark.skip(reason="crashing on OS X with Homebrew's GDAL")
def test_ycbcr_interp(tmpdir):
"""A YCbCr TIFF has red, green, blue bands."""
with rasterio.open('tests/data/RGB.byte.tif') as src:
meta = src.meta
meta['photometric'] = 'ycbcr'
meta['compress'] = 'jpeg'
meta['count'] = 3
tiffname = str(tmpdir.join('foo.tif'))
with rasterio.open(tiffname, 'w', **meta) as dst:
assert dst.colorinterp(1) == ColorInterp.red
assert dst.colorinterp(2) == ColorInterp.green
assert dst.colorinterp(3) == ColorInterp.blue
3
Example 5
Project: supriya Source File: test_supriya___doc__.py
@pytest.mark.skip()
@pytest.mark.parametrize('obj', functions)
def test_supriya___doc___03(obj):
r'''All functions have a docstring.
'''
if obj.__doc__ is None:
message = 'No docuementation for: {}'.format(obj.__name__)
raise Exception(message)
3
Example 6
Project: ara Source File: test_app.py
@pytest.mark.skip(reason='host functionality currently in flux')
@pytest.mark.incomplete
def test_show_host_incomplete(self):
ctx = ansible_run(complete=False)
res = self.client.get('/host/{}/'.format(
ctx['host'].name))
self.assertEqual(res.status_code, 200)
3
Example 7
Project: ktbs Source File: test_rdfrest_utils_prefix_conjunctive_view.py
@mark.skip('not implemented yet')
@mark.parametrize("datasetname, triple, contextname, expected", [
('p12', ([EX.x1,EX.x2], EX.p, None), None, {
(EX.x1, EX.p, EX.x2),
(EX.x2, EX.p, EX.x3),
}),
('p12', ([EX.x1,EX.x2], EX.p, None), 'g1', {
(EX.x1, EX.p, EX.x2),
}),
('p12', ([EX.x1,EX.x2], EX.p, None), 'g2', {
(EX.x2, EX.p, EX.x3),
}),
])
def test_triples_choices(self, datasetname, triple, contextname, expected):
dataset = getattr(self, datasetname)
context = contextname and getattr(self, contextname) or None
assert set(dataset.triples_choices(triple, context)) == set(expected)
3
Example 8
@pytest.mark.skip(REASON = "todo failing")
@pytest.mark.remote
def testRetrievalTimeout(self):
''' tests whether the socket timeout is honored by our class '''
SLOW_URL = "http://www.csse.uwa.edu.au/"
with pytest.raises(urllib2.URLError):
r = Retrieve(self.__class__.__name__,
default_timeout=0.1).open(SLOW_URL)
content = r.read()
r.close()
3
Example 9
Project: dcos-cli Source File: test_marathon.py
@pytest.mark.skip(reason="https://mesosphere.atlassian.net/browse/DCOS-10325")
def test_stop_task_wipe():
with _zero_instance_app():
_start_app('zero-instance-app', 1)
watch_all_deployments()
task_list = _list_tasks(1, 'zero-instance-app')
task_id = task_list[0]['id']
_stop_task(task_id, '--wipe')
3
Example 10
Project: socorro Source File: test_smoke_tests.py
@pytest.mark.skip("TODO: Persona is being deprecated - move test to Google Accounts")
def test_non_privileged_accounts_cannot_view_exploitable_crash_reports(self, base_url, selenium):
csp = CrashStatsHomePage(selenium, base_url).open()
csp.footer.login()
assert csp.footer.is_logged_in
assert 'Exploitable Crashes' not in csp.header.report_list
csp.selenium.get(base_url + self._exploitability_url)
assert 'Insufficient Privileges' in csp.page_heading
csp.footer.logout()
assert csp.footer.is_logged_out
3
Example 11
Project: Flexget Source File: test_seriesparser.py
@pytest.mark.skip(reason='FIX: #402 .. a bit hard to do')
def test_ep_in_square_brackets(self, parse):
"""SeriesParser: [S01] [E02] NOT IMPLEMENTED"""
# FIX: #402 .. a bit hard to do
s = parse(name='Something', data='Something [S01] [E02]')
assert (s.season == 1 and s.episode == 2), 'failed to parse %s' % s
3
Example 12
Project: supriya Source File: test_supriya___doc__.py
@pytest.mark.skip()
@pytest.mark.parametrize('obj', classes)
def test_supriya___doc___01(obj):
r'''All classes have a docstring.
'''
if obj.__doc__ is None:
message = 'No docuementation for: {}'.format(obj.__name__)
raise Exception(message)
3
Example 13
Project: ara Source File: test_app.py
@pytest.mark.skip(reason='host functionality currently in flux')
def test_show_host_facts(self):
ctx = ansible_run()
res = self.client.get('/host/{}/facts/'.format(
ctx['host'].name))
self.assertEqual(res.status_code, 200)
3
Example 14
Project: supriya Source File: test_supriya___hash__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___hash___01(class_):
r'''All concrete classes with __hash__ can hash.
'''
if not inspect.isabstract(class_):
if getattr(class_, '__hash__', None):
instance = class_()
value = hash(instance)
assert isinstance(value, int)
3
Example 15
Project: abjad Source File: test_topleveltools_play.py
@pytest.mark.skip('unskip me before building 2.15')
def test_topleveltools_play_01():
r'''A note can be played.
'''
note = Note(1, (1, 2))
play(note)
3
Example 16
Project: supriya Source File: test_supriya___str__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___str___01(class_):
r'''All concrete classes have a string representation.
With the exception of the exception classes. And those classes listed
explicitly here.
'''
if not inspect.isabstract(class_):
if not issubclass(class_, Exception):
instance = class_()
string = str(instance)
assert string is not None
if class_ not in _allowed_to_be_empty_string:
assert string != ''
3
Example 17
Project: Flexget Source File: test_exists_movie.py
@pytest.mark.skip(reason='test is broken')
def test_propers(self, execute_task):
"""exists_movie plugin: new proper & proper already exists"""
task = execute_task('test_propers')
assert task.find_entry('accepted', title='Mock.S01E01.Proper'), \
'new proper not accepted'
assert task.find_entry('rejected', title='Test.S01E01'), \
'pre-existin proper should have caused reject'
3
Example 18
Project: slackbot Source File: test_functional.py
@pytest.mark.skip
def test_bot_upload_file_from_link(driver):
url = 'https://slack.com/favicon.ico'
fname = basename(url)
driver.send_direct_message('upload %s' % url)
driver.wait_for_bot_direct_message('uploading %s' % fname)
3
Example 19
Project: abjad Source File: test_quantizationtools_ParallelJobHandler___call__.py
@pytest.mark.skip()
def test_quantizationtools_ParallelJobHandler___call___01():
jobs = [Job(x) for x in range(1, 11)]
job_handler = quantizationtools.ParallelJobHandler()
finished_jobs = job_handler(jobs)
3
Example 20
Project: socorro Source File: test_search.py
@pytest.mark.skip("TODO: Update to work with the new date picker")
@pytest.mark.nondestructive
def test_search_for_unrealistic_data(self, base_url, selenium):
csp = CrashStatsHomePage(selenium, base_url).open()
cs_super = csp.header.click_super_search()
cs_super.select_platform('Windows')
# Do an advanced search
cs_super.click_new_line()
cs_super.select_facet('0', 'date')
cs_super.select_operator('0', '>')
cs_super.select_match('0', '2000:01:01 00-00')
cs_super.click_search()
assert 'Enter a valid date/time.' == cs_super.error
3
Example 21
Project: Flexget Source File: test_myepisodes.py
@pytest.mark.skip(reason="Test myepisodes (DISABLED) -- account locked?")
def test_myepisodes_id(self, execute_task):
task = execute_task('test')
entry = task.find_entry('accepted', title='the.simpsons.S10E10.hdtv')
assert entry, 'entry not present'
# It's tough to verify the marking worked properly, at least check that myepisodes_id is populated
assert entry['myepisodes_id'] == '10', 'myepisodes_id should be 10 for The Simpsons'
3
Example 22
Project: abjad Source File: test_scoretools_fuse_measures.py
@pytest.mark.skip()
def test_scoretools_fuse_measures_05():
r'''Fusing empty selection returns none.
'''
staff = Staff()
result = scoretools.fuse_measures(staff[:])
assert result is None
3
Example 23
def __call__(self, function):
"""
Args:
function (method, class): This is the test method or class we want to skip if the conditions aren't met
"""
# Load config
load_config_files()
# test if the config parameter is what we require
test = getConfig(self.section)[self.item] == self.value
clear_config()
if test:
# Mark test as skip if it's not what we require
return pytest.mark.skip(self.reason)(function)
return function
3
Example 24
Project: aiomysql Source File: test_pool.py
@pytest.mark.skip(reason='Not implemented')
@pytest.mark.run_loop
def test_create_pool_with_timeout(pool_creator):
pool = yield from pool_creator(minsize=3, maxsize=3)
timeout = 0.1
assert timeout == pool.timeout
conn = yield from pool.acquire()
assert timeout == conn.timeout
pool.release(conn)
3
Example 25
Project: abjad Source File: test_scoretools_fuse_measures.py
@pytest.mark.skip()
def test_scoretools_fuse_measures_06():
r'''Fusing selection of only one measure returns measure unaltered.
'''
measure = Measure((3, 8), "c'8 d'8 e'8")
staff = Staff([measure])
new = scoretools.fuse_measures(staff[:])
assert new is measure
3
Example 26
Project: supriya Source File: test_supriya___deepcopy__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___deepcopy___01(class_):
r'''All concrete classes with a storage format can copy.
'''
if '_storage_format_specification' not in dir(class_):
return
if inspect.isabstract(class_):
return
if class_ in _classes_to_fix:
return
instance_one = class_()
instance_two = copy.deepcopy(instance_one)
instance_one_format = format(instance_one, 'storage')
instance_two_format = format(instance_two, 'storage')
assert instance_one_format == instance_two_format
3
Example 27
Project: supriya Source File: test_supriya_pickle.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya_pickle_01(class_):
r'''All storage-formattable classes are pickable.
'''
if '_storage_format_specification' in dir(class_):
if not inspect.isabstract(class_):
if class_ not in _classes_to_fix:
instance_one = class_()
pickle_string = pickle.dumps(instance_one)
instance_two = pickle.loads(pickle_string)
instance_one_format = format(instance_one, 'storage')
instance_two_format = format(instance_two, 'storage')
assert instance_one_format == instance_two_format
3
Example 28
@pytest.mark.skip(reason='host functionality currently in flux')
def test_show_host(self):
ctx = ansible_run()
res = self.client.get('/host/{}/'.format(
ctx['host'].name))
self.assertEqual(res.status_code, 200)
3
Example 29
Project: supriya Source File: test_supriya___doc__.py
@pytest.mark.skip()
@pytest.mark.parametrize('pair', class_attr_pairs)
def test_supriya___doc___02(pair):
r'''All methods and properties have a docstring.
'''
cls, attr = pair
if attr.name[0].isalpha() or attr.name.startswith('__'):
if getattr(cls, attr.name).__doc__ is None:
message = 'No docuementation for: {}.{}'
message = message.format(cls.__name__, attr.name)
raise Exception(message)
3
Example 30
Project: abjad Source File: test_abjad___radd__.py
@pytest.mark.skip('Correct failing classes.')
@pytest.mark.parametrize('class_', classes)
def test_abjad___radd___01(class_):
r'''All classes implementing __add__ also implement __radd__.
'''
if inspect.isabstract(class_):
return
if hasattr(class_, '__add__'):
assert hasattr(class_, '__radd__')
3
Example 31
Project: supriya Source File: test_supriya___format__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___format___01(class_):
r'''All concrete classes have a storage format.
'''
if '_storage_format_specification' in dir(class_) and \
not inspect.isabstract(class_):
instance = class_()
instance_format = format(instance, 'storage')
assert isinstance(instance_format, str)
assert not instance_format == ''
3
Example 32
Project: ara Source File: test_app.py
@pytest.mark.skip(reason='host functionality currently in flux')
def test_show_host_exists_facts_missing(self):
ctx = ansible_run(gather_facts=False)
res = self.client.get('/host/{}/facts/'.format(
ctx['host'].name))
self.assertEqual(res.status_code, 404)
3
Example 33
Project: supriya Source File: test_supriya___init__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___init___01(class_):
r'''All concrete classes initialize from empty input.
'''
if not inspect.isabstract(class_):
instance = class_()
assert instance is not None
3
Example 34
@pytest.mark.skip(reason="todo")
def test_command_line(self):
runner = CliRunner()
result = runner.invoke(cli, ['up', 'hi'])
assert result.exit_code == 0
assert 'Debug mode is on' in result.output
assert 'Syncing' in result.output
3
Example 35
Project: supriya Source File: test_supriya___repr__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___repr___01(class_):
r'''All concrete classes have an interpreter representation.
'''
if not inspect.isabstract(class_):
instance = class_()
string = repr(instance)
assert string is not None
assert string != ''
3
Example 36
@pytest.mark.skip(reason='This doesn\'t work on linux')
def test_auto_escape(self, execute_task):
task = execute_task('test_auto_escape')
for entry in task.accepted:
with open(os.path.join(self.__tmp__, entry['title']), 'r') as infile:
line = infile.readline().rstrip('\n')
assert line == 'single \' double\"', '%s != single \' double\"' % line
line = infile.readline().rstrip('\n')
assert line == '/start/single \' double\"', '%s != /start/single \' double\"' % line
line = infile.readline().rstrip('\n')
assert line == '% a $a! ` *', '%s != % a $a! ` *' % line
3
Example 37
Project: mixer Source File: test_django.py
@pytest.mark.skip(reason='Not implemented')
def test_many_to_many_select(mixer):
mixer.cycle(5).blend('django_app.message')
assert Message.objects.all()
assert Message.objects.all().count() == 5
mixer.cycle(10).blend('django_app.tag', messages=mixer.SELECT)
assert Tag.objects.all()
assert Message.objects.all().count() == 5
3
Example 38
Project: abjad Source File: test_topleveltools_play.py
@pytest.mark.skip('unskip me before building 2.15')
def test_topleveltools_play_02():
r'''A score can be played.
'''
notes = [Note(i, (1, 64)) for i in range(10)]
score = Score([Staff(notes)])
play(score)
3
Example 39
Project: slackbot Source File: test_functional.py
@pytest.mark.skip
def test_bot_upload_file(driver):
png = join(abspath(dirname(__file__)), 'slack.png')
driver.send_direct_message('upload %s' % png)
driver.wait_for_bot_direct_message('uploading slack.png')
driver.wait_for_file_uploaded('slack.png')
3
Example 40
Project: Flexget Source File: test_exists_movie.py
@pytest.mark.skip(reason='test is broken')
def test_with_metainfo_series(self, execute_task):
"""Tests that exists_movie works with series data from metainfo_series"""
task = execute_task('test_with_metainfo_series')
assert task.find_entry('rejected', title='Foo.Bar.S01E02.XViD'), \
'Foo.Bar.S01E02.XViD should have been rejected(exists)'
assert not task.find_entry('rejected', title='Foo.Bar.S01E03.XViD'), \
'Foo.Bar.S01E03.XViD should not have been rejected'
3
Example 41
Project: integration_tests Source File: test_download_report.py
@pytest.mark.skip
@pytest.mark.parametrize("filetype", ["txt", "csv"])
def test_download_report_firefox(needs_firefox, setup_a_provider, report, filetype):
""" Download the report as a file and check whether it was downloaded. """
extension = "." + filetype
clean_temp_directory()
report.download(filetype)
wait_for(lambda: any([file.endswith(extension) for file in os.listdir(
browser.firefox_profile_tmpdir)]), num_sec=60.0)
clean_temp_directory()
3
Example 42
@pytest.mark.skip(reason='FAILS - DISABLED')
def test_encode_html(self):
"""utils encode_html (FAILS - DISABLED)"""
# why this does not encode < ?
from flexget.utils.tools import encode_html
print(encode_html('<3'))
assert encode_html('<3') == '<3'
3
Example 43
Project: molecule Source File: test_docker_scenarios.py
@pytest.mark.skip(reason=(
'Determine how to better test this. '
'Receive py.error.ENOENT: [No such file or directory]: getcwd()'))
def test_command_init_verifier_goss(temp_dir):
d = os.path.join(temp_dir, 'command-test-goss')
sh.molecule('init', '--role', 'command-test-goss', '--driver', 'docker',
'--verifier', 'goss')
os.chdir(d)
sh.molecule('test')
3
Example 44
Project: cocrawler Source File: test_facet.py
@pytest.mark.skip(reason='not yet implemented')
def test_google_stuff():
t = '''
<script type="text/javascript" defer="defer" async="async" src="//www.google-analytics.com/analytics.js?oeorvp"></script>
<script src="http://www.google.com/adsense/domains/caf.js"></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
'''
facets = facet.find_head_facets(t)
assert facets == 'foo'
3
Example 45
def pytest_collection_modifyitems(session, config, items):
version = _read_server_version(config)
for item in items:
if 'redis_version' in item.keywords:
marker = item.keywords['redis_version']
if version < marker.kwargs['version']:
item.add_marker(pytest.mark.skip(
reason=marker.kwargs['reason']))
if 'ssl_proxy' in item.fixturenames:
item.add_marker(pytest.mark.skipif(
"not os.path.exists('/usr/bin/socat')",
reason="socat package required (apt-get install socat)"))
3
Example 46
Project: supriya Source File: test_supriya___copy__.py
@pytest.mark.skip()
@pytest.mark.parametrize('class_', classes)
def test_supriya___copy___01(class_):
r'''All concrete classes with a storage format can copy.
'''
if '_storage_format_specification' not in dir(class_):
return
if inspect.isabstract(class_):
return
instance_one = class_()
instance_two = copy.copy(instance_one)
instance_one_format = format(instance_one, 'storage')
instance_two_format = format(instance_two, 'storage')
assert instance_one_format == instance_two_format
2
Example 47
Project: Flexget Source File: test_subtitle_list.py
@pytest.mark.skip(reason="Test sporadically fails")
# @pytest.mark.skipif(sys.version_info < (2, 7), reason='requires python2.7')
# @pytest.mark.skipif(not subliminal, reason='requires subliminal')
def test_subtitle_list_subliminal_success(self, execute_task):
task = execute_task('subtitle_add_local_file')
assert len(task.entries) == 1, 'Task should have accepted walking dead local file'
task = execute_task('subtitle_add_another_local_file')
assert len(task.entries) == 1, 'Task should have accepted jessica jones file'
with open('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.en.srt', 'a'):
os.utime('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.en.srt', None)
with open('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.ja.srt', 'a'):
os.utime('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.ja.srt', None)
with open('subtitle_list_test_dir/Marvels.Jessica.Jones.S01E02-FlexGet.en.srt', 'a'):
os.utime('subtitle_list_test_dir/Marvels.Jessica.Jones.S01E02-FlexGet.en.srt', None)
task = execute_task('subtitle_simulate_success')
assert len(task.failed) == 1, 'Should have found both languages for walking dead but not for jessica jones'
task = execute_task('subtitle_emit')
assert len(task.entries) == 1, 'Walking Dead should have been removed from the list'
try:
os.remove('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.en.srt')
except OSError:
pass
try:
os.remove('subtitle_list_test_dir/The.Walking.Dead.S06E08-FlexGet.ja.srt')
except OSError:
pass
try:
os.remove('subtitle_list_test_dir/Marvels.Jessica.Jones.S01E02-FlexGet.en.srt')
except OSError:
pass
0
Example 48
@pytest.mark.skip(reason='files location not supported for aiohttpparser')
def test_parse_files(self, testapp):
pass
0
Example 49
@pytest.mark.skip(reason="store() currently not tested")
def test_store(self):
# store() is called transparently by SelinonTask - not possible to directly check it without running a task
pass
0
Example 50
@pytest.mark.skip(reason='Parsing vendor media types is not supported in bottle')
def test_parse_json_with_vendor_media_type(self, testapp):
pass