File: py26compat.py

package info (click to toggle)
python-setuptools 5.5.1-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,024 kB
  • ctags: 4,867
  • sloc: python: 24,503; xml: 846; makefile: 201; ansic: 198
file content (14 lines) | stat: -rw-r--r-- 267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import unittest

try:
	# provide skipIf for Python 2.4-2.6
	skipIf = unittest.skipIf
except AttributeError:
	def skipIf(condition, reason):
		def skipper(func):
			def skip(*args, **kwargs):
				return
			if condition:
				return skip
			return func
		return skipper