Update it all, VisualStudio Changes

This commit is contained in:
2016-08-23 12:33:06 -05:00
parent 2a0c6f9e45
commit b8814259b5
136 changed files with 180080 additions and 66 deletions

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>1b5fba75-26dd-4737-9104-5b485db26457</ProjectGuid>
<ProjectHome>
</ProjectHome>
<StartupFile>example\example_test.py</StartupFile>
<SearchPath>
</SearchPath>
<WorkingDirectory>.</WorkingDirectory>
<OutputPath>.</OutputPath>
<Name>Exercism.python</Name>
<RootNamespace>python</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>true</DebugSymbols>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
</PropertyGroup>
<ItemGroup>
<Compile Include="example\example.py" />
<Compile Include="example\example_test.py" />
</ItemGroup>
<ItemGroup>
<Folder Include="example\" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<PtvsTargetsFile>$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets</PtvsTargetsFile>
</PropertyGroup>
<Import Condition="Exists($(PtvsTargetsFile))" Project="$(PtvsTargetsFile)" />
<Import Condition="!Exists($(PtvsTargetsFile))" Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<!-- Uncomment the CoreCompile target to enable the Build command in
Visual Studio and specify your pre- and post-build commands in
the BeforeBuild and AfterBuild targets below. -->
<!--<Target Name="CoreCompile" />-->
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
</Project>

View File

@@ -0,0 +1,2 @@
def add(x, y):
return x + y

View File

@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import example
class ExampleTests(unittest.TestCase):
def test_add_2_and_2(self):
self.assertEqual(
4,
example.add(2, 2)
)
def test_add_12_and_24(self):
self.assertEqual(
36,
example.add(12, 24)
)
def test_add_100_and_1(self):
self.assertEqual(
101,
example.add(100, 1)
)
def test_add_2_and_minus_2(self):
self.assertEqual(
0,
example.add(2, -2)
)
if __name__ == '__main__':
unittest.main()