tests might fail on windows
This commit is contained in:
parent
ff3d3afe9e
commit
bd56a3f2a5
|
@ -41,6 +41,7 @@ class TestConfigMaterial:
|
|||
material_config['material'][0]['constituents'][0]['O']=[0,0,0,0]
|
||||
assert not material_config.is_valid
|
||||
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='utf8 "not equal" might cause trouble')
|
||||
def test_invalid_fraction(self,ref_path):
|
||||
material_config = ConfigMaterial.load(ref_path/'material.yaml')
|
||||
material_config['material'][0]['constituents'][0]['v']=.9
|
||||
|
|
|
@ -108,7 +108,7 @@ class TestResult:
|
|||
assert np.allclose(in_memory,in_file)
|
||||
|
||||
@pytest.mark.parametrize('mode',
|
||||
['direct',pytest.param('function',marks=pytest.mark.xfail(sys.platform=='darwin',reason='n/a'))])
|
||||
['direct',pytest.param('function',marks=pytest.mark.xfail(sys.platform in ['darwin','win32'], reason='n/a'))])
|
||||
def test_add_calculation(self,default,tmp_path,mode):
|
||||
|
||||
if mode == 'direct':
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import sys
|
||||
import random
|
||||
import os
|
||||
|
||||
import pytest
|
||||
import numpy as np
|
||||
|
@ -11,14 +11,17 @@ from damask import util
|
|||
|
||||
class TestUtil:
|
||||
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='echo is not a Windows command')
|
||||
def test_execute_direct(self):
|
||||
out,err = util.execute('echo test')
|
||||
assert out=='test\n' and err==''
|
||||
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='echo is not a Windows command')
|
||||
def test_execute_env(self):
|
||||
out,err = util.execute('sh -c "echo $test_for_execute"',env={'test_for_execute':'test'})
|
||||
assert out=='test\n' and err==''
|
||||
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='false is not a Windows command')
|
||||
def test_execute_runtime_error(self):
|
||||
with pytest.raises(RuntimeError):
|
||||
util.execute('false')
|
||||
|
|
Loading…
Reference in New Issue