mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-14 17:43:53 +00:00
4c6bee3514
* Set __file__ constant when using eval_file * Use const ref * Use a move instead * Revert * Improve test * Guard test with Python version * Fix tests * Dont support Python2 API * Drop Python2 eval __file__ support * Hack * Semisupport Python2 * Take2 * Remove Python2 support
11 lines
273 B
Python
11 lines
273 B
Python
# -*- coding: utf-8 -*-
|
|
import sys
|
|
|
|
import test_cmake_build
|
|
|
|
if str is not bytes: # If not Python2
|
|
assert isinstance(__file__, str) # Test this is properly set
|
|
|
|
assert test_cmake_build.add(1, 2) == 3
|
|
print("{} imports, runs, and adds: 1 + 2 = 3".format(sys.argv[1]))
|