@skip('multiple_execute')
@skip('netstandard')
def test_addreferencetofileandpath_conflict():
 code1 = '\nusing System;\n\npublic class CollisionTest {\n    public static string Result(){\n        return "Test1";\n    }\n}\n'
 code2 = '\nusing System;\n\npublic class CollisionTest {\n    public static string Result(){\n        return "Test2";\n    }\n}\n'
 tmp = testpath.temporary_dir
 (test1_cs, test1_dll) = (path_combine(tmp, 'test1.cs'), path_combine(tmp, 'CollisionTest.dll'))
 (test2_cs, test2_dll) = (path_combine(tmp, 'test2.cs'), path_combine(sys.prefix, 'CollisionTest.dll'))
 write_to_file(test1_cs, code1)
 write_to_file(test2_cs, code2)
 AreEqual(run_csc(((('/nologo /target:library /out:' + test2_dll) + ' ') + test2_cs)), 0)
 AreEqual(run_csc(((('/nologo /target:library /out:' + test1_dll) + ' ') + test1_cs)), 0)
 clr.AddReferenceToFileAndPath(test1_dll)
 import CollisionTest
 AreEqual(CollisionTest.Result(), 'Test1')

@ skip ( 'multiple_execute' ) @ skip ( 'netstandard' ) def test_addreferencetofileandpath_conflict ( ) : code1 = '\nusing System;\n\npublic class CollisionTest {\n    public static string Result(){\n        return "Test1";\n    }\n}\n' code2 = '\nusing System;\n\npublic class CollisionTest {\n    public static string Result(){\n        return "Test2";\n    }\n}\n' tmp = testpath . temporary_dir ( test1_cs , test1_dll ) = ( path_combine ( tmp , 'test1.cs' ) , path_combine ( tmp , 'CollisionTest.dll' ) ) ( test2_cs , test2_dll ) = ( path_combine ( tmp , 'test2.cs' ) , path_combine ( sys . prefix , 'CollisionTest.dll' ) ) write_to_file ( test1_cs , code1 ) write_to_file ( test2_cs , code2 ) AreEqual ( run_csc ( ( ( ( '/nologo /target:library /out:' + test2_dll ) + ' ' ) + test2_cs ) ) , 0 ) AreEqual ( run_csc ( ( ( ( '/nologo /target:library /out:' + test1_dll ) + ' ' ) + test1_cs ) ) , 0 ) clr . AddReferenceToFileAndPath ( test1_dll ) import CollisionTest AreEqual ( CollisionTest . Result ( ) , 'Test1' )
verify addreferencetofileandpath picks up the path specified .