Пример #1
0
	def test_index_url(self):
		script = textwrap.dedent('''
			__requires__ = ['foo']
			__index_url__ = 'https://my.private.index/'
			''')
		reqs = scripts.DepsReader(script).read()
		assert reqs.index_url == 'https://my.private.index/'
Пример #2
0
	def test_dependency_links(self):
		script = textwrap.dedent('''
			__requires__ = ['foo==0.42']
			__dependency_links__ = ['git+ssh://[email protected]/repo.git#egg=foo-0.42']
			''')
		reqs = scripts.DepsReader(script).read()
		assert reqs.dependency_links == [
			'git+ssh://[email protected]/repo.git#egg=foo-0.42']
Пример #3
0
	def test_reads_files_with_multiple_assignment(self):
		script = textwrap.dedent('''
			__requires__=['foo']
			x, a = [a, x]
			''')
		assert scripts.DepsReader(script).read() == ['foo']
Пример #4
0
	def test_reads_files_with_attribute_assignment(self):
		script = textwrap.dedent('''
			__requires__=['foo']
			x.a = 'bar'
			''')
		assert scripts.DepsReader(script).read() == ['foo']
Пример #5
0
	def test_single_dep(self):
		script = textwrap.dedent('''
			__requires__='foo'
			''')
		assert scripts.DepsReader(script).read() == ['foo']