forked from lijiext/lammps
Make sure Python tests run unbuffered so PyLammps works
This commit is contained in:
parent
ca24806f4c
commit
9cdd35e625
|
@ -32,9 +32,9 @@ if (Python_EXECUTABLE)
|
|||
find_package_handle_standard_args(COVERAGE DEFAULT_MSG COVERAGE_BINARY)
|
||||
|
||||
if(COVERAGE_FOUND)
|
||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} ${COVERAGE_BINARY} run --parallel-mode --include=${LAMMPS_PYTHON_DIR}/lammps.py --omit=${LAMMPS_PYTHON_DIR}/install.py)
|
||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} -u ${COVERAGE_BINARY} run --parallel-mode --include=${LAMMPS_PYTHON_DIR}/lammps.py --omit=${LAMMPS_PYTHON_DIR}/install.py)
|
||||
else()
|
||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE})
|
||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE} -u)
|
||||
endif()
|
||||
else()
|
||||
set(PYTHON_TEST_RUNNER ${Python_EXECUTABLE})
|
||||
|
|
|
@ -44,6 +44,7 @@ class PythonPyLammps(unittest.TestCase):
|
|||
types = [1, 1]
|
||||
|
||||
self.assertEqual(self.pylmp.lmp.create_atoms(2, id=None, type=types, x=x), 2)
|
||||
self.assertEqual(self.pylmp.system.natoms, 2)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue